2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / in_mod_conv.adb
blob5ff080825abd58d7bcce9891cc58c6409b02e255
1 -- { dg-do compile }
3 procedure in_mod_conv is
4 package Test is
5 type T is new Natural range 1..6;
6 subtype T_SubType is T range 3..5;
7 type A1 is array (T range <>) of boolean;
8 type A2 is new A1 (T_SubType);
9 PRAGMA pack (A2);
10 type New_A2 is new A2;
11 end Test;
12 package body Test is
13 procedure P1 (Obj : in New_A2) is
14 begin
15 null;
16 end P1;
17 procedure P2 (Data : in out A2) is
18 begin
19 P1 (New_A2 (Data (T_SubType))); -- test
20 end P2;
21 end Test;
22 begin
23 null;
24 end;