RISC-V: Add support for riscv-*-*.
[official-gcc.git] / gcc / testsuite / gnat.dg / pack12.adb
blob640ace325de7e26c6f002a2cb9789feded9fb041
1 -- { dg-do run }
3 procedure Pack12 is
5 type U16 is mod 2 ** 16;
7 type Key is record
8 Value : U16;
9 Valid : Boolean;
10 end record;
12 type Key_Buffer is record
13 Current, Latch : Key;
14 end record;
16 type Block is record
17 Keys : Key_Buffer;
18 Stamp : U16;
19 end record;
20 pragma Pack (Block);
22 My_Block : Block;
23 My_Stamp : constant := 16#1234#;
25 begin
26 My_Block.Stamp := My_Stamp;
27 My_Block.Keys.Latch := My_Block.Keys.Current;
28 if My_Block.Stamp /= My_Stamp then
29 raise Program_Error;
30 end if;
31 end;