summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/pack7.adb
blob: 000e7fa8163bf15c46faaceb4a7c2931bd3685e4 (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
25
26
27
-- { dg-do compile }
-- { dg-options "-gnatws" }

procedure Pack7 is

  type R is record
     I : Integer;
     a, b : Character;
  end record;

  type Ar1 is array (1..4) of R;
  type Ar2 is array (1..4) of R;
  pragma Pack (Ar2);

  type R2 is record
    A : Ar2;
  end record;
  for R2 use record
    A at 0 range 0 .. 48*4-1;
  end record;

  X : Ar1;
  Y : Ar2;

begin
  Y (1) := X (1);
end;