Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gnat.dg / discr39.adb
blob1ffb972dc2c2a6b5877fcdd2852dbba9c883db37
1 -- { dg-do run }
3 with System.Storage_Elements; use System.Storage_Elements;
5 procedure Discr39 is
7 type Rec (Has_Src : Boolean) is record
8 case Has_Src is
9 when True => Src : aliased Integer;
10 when False => null;
11 end case;
12 end record;
13 pragma Pack(Rec);
14 for Rec'Alignment use Integer'Alignment;
16 R : Rec (Has_Src => True);
18 begin
19 if R.Src'Address mod Integer'Alignment /= 0 then
20 raise Program_Error;
21 end if;
22 end;