Fix the new pr83361.c testcase
[official-gcc.git] / gcc / testsuite / gnat.dg / specs / unchecked_union2.ads
blob4ed3493f676422e7dc3b43b8654b8e99586c030e
1 -- { dg-do compile }
3 package Unchecked_Union2 is
5 type Small_Int is range 0 .. 2**19 - 1;
7 type R1 (B : Boolean := True) is record
8 case B is
9 when True => Data1 : Small_Int;
10 when False => Data2 : Small_Int;
11 end case;
12 end record;
14 for R1 use record
15 Data1 at 0 range 0 .. 18;
16 Data2 at 0 range 0 .. 18;
17 end record;
18 for R1'Size use 24;
20 pragma Unchecked_Union (R1);
22 type R2 is record
23 Data : R1;
24 end record;
26 for R2 use record
27 Data at 0 range 3 .. 26;
28 end record;
30 end Unchecked_Union2;