* gnat.dg/sync_iface_test.ad[s,b]: New test.
From-SVN: r138410
This commit is contained in:
parent
fa4bc5ab59
commit
9780576277
3 changed files with 32 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
2008-07-31 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* gnat.dg/sync_iface_test.ad[s,b]: New test.
|
||||
|
||||
* gnat.dg/specs/sync_iface_test.ads: New test.
|
||||
|
||||
2008-07-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
|
19
gcc/testsuite/gnat.dg/sync_iface_test.adb
Normal file
19
gcc/testsuite/gnat.dg/sync_iface_test.adb
Normal file
|
@ -0,0 +1,19 @@
|
|||
-- { dg-do compile }
|
||||
package body Sync_Iface_Test is
|
||||
protected body Buffer is
|
||||
procedure Dummy is begin null; end;
|
||||
end;
|
||||
|
||||
function First (Obj : Buffer) return Natural is
|
||||
begin
|
||||
return 0;
|
||||
end;
|
||||
|
||||
procedure Do_Test (Dummy : Natural; Item : Buffer)
|
||||
is
|
||||
Position1 : Natural := First (Item);
|
||||
Position2 : Natural := Item.First; -- Problem here
|
||||
begin
|
||||
null;
|
||||
end;
|
||||
end;
|
11
gcc/testsuite/gnat.dg/sync_iface_test.ads
Normal file
11
gcc/testsuite/gnat.dg/sync_iface_test.ads
Normal file
|
@ -0,0 +1,11 @@
|
|||
package Sync_Iface_Test is
|
||||
type Iface is limited interface;
|
||||
function First (Obj : Iface) return Natural is abstract;
|
||||
|
||||
protected type Buffer is new Iface with
|
||||
procedure Dummy;
|
||||
end;
|
||||
overriding function First (Obj : Buffer) return Natural;
|
||||
|
||||
procedure Do_Test (Dummy : Natural; Item : Buffer);
|
||||
end;
|
Loading…
Add table
Reference in a new issue