summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/pack11.adb
blob: 479062b5fd5ee480febd3babfceca262f86f3182 (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
28
29
-- { dg-do run }
-- { dg-options "-gnatws" }

with System;

procedure Pack11 is

  type R1 is record
    A1, A2, A3 : System.Address;
  end record;

  type R2 is record
    C : Character;
    R : R1;
  end record;
  pragma Pack (R2);

  procedure Dummy (R : R1) is begin null; end;

  procedure Init (X : R2) is
  begin
    Dummy (X.R);
  end;

  My_R2 : R2;

begin
  Init (My_R2);
end;