Fix internal error on function call returning extension of limited interface
[official-gcc.git] / gcc / testsuite / gnat.dg / bip_prim_func2.adb
blobe139c89a991f7149773413d7b108ba62cc89c6b3
1 -- { dg-do run }
3 with BIP_Prim_Func2_Pkg;
5 procedure BIP_Prim_Func2 is
7 package B is
8 type Instance is limited interface;
9 function Make return Instance is abstract;
10 end B;
12 package C is
13 type Instance is new B.Instance with null record;
14 function Make return Instance is (null record);
15 end C;
17 package T is new BIP_Prim_Func2_Pkg (B.Instance, C.Instance, C.Make);
19 Thing : B.Instance'Class := T.Make (2);
21 begin
22 null;
23 end;