PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / alignment10.adb
blob61779f1d7b4e76fb45e0be8faf615518a7ca6e83
1 -- { dg-do run }
3 procedure Alignment10 is
5 type Short_T is mod 2 ** 16;
6 for Short_T'Size use 16;
7 for Short_T'Alignment use 1;
9 subtype Short_Sub_T is Short_T range 1000 .. 1005;
11 A : aliased Short_T := 1000;
12 B : Short_Sub_T;
13 for B'Address use A'Address;
14 pragma Import (Ada, B);
16 begin
17 if B /= 1000 then
18 raise Program_Error;
19 end if;
20 end;