Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gnat.dg / tamdt.adb
blob81af6ade2838643ccf2d3fdb41907f5030e3bcea
2 with Tamdt_Aux;
4 package body TAMDT is
5 type TAMT1 is new Tamdt_Aux.Priv (X => 1);
6 type TAMT2 is new Tamdt_Aux.Priv;
8 procedure Check is
9 Ptr1 : TAMT1_Access := new TAMT1;
10 Ptr2 : TAMT2_Access := new TAMT2 (X => 2);
11 begin
12 if Ptr1.all.X /= 1 then
13 raise Program_Error;
14 end if;
15 if Ptr2.all.X /= 2 then
16 raise Program_Error;
17 end if;
18 end;
19 end;