aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/valid1.adb
blob: a24376733b111631033210da0d56938a5b7faef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--  { dg-do run }
--  { dg-options "-gnatVi" }

procedure valid1 is
   type m is range 0 .. 10;
   for m'size use 8;
   
   type r is record
      a, b : m;
      c, d, e, f : boolean;
   end record;
   pragma Pack (r);
   for R'size use 20;
   
   type G is array (1 .. 3, 1 .. 3) of R;
   pragma Pack (G);
   
   procedure h (c : m) is begin null; end;
   
   GG : G := (others => (others => (2, 3, true, true, true, true)));

begin
   h (GG (3, 2).a);
end;