1-- { dg-do compile }
2
3with System, Ada.Unchecked_Conversion;
4procedure alignment3 is
5
6   type Value_Type (Is_Short : Boolean) is record
7      case Is_Short is
8         when True =>   V : Natural;
9         when others => A, B : Natural;
10      end case;
11   end record;
12
13   type Link_Type (Short_Values : Boolean) is record
14      Input, Output : Value_Type (Short_Values);
15      Initialized : Boolean;
16      N_Probes    : Natural;
17   end record;
18   pragma No_Component_Reordering (Link_Type);
19
20   type Link_Access is access Link_Type;
21
22   type Natural_Access is access all Natural;
23   function To_Natural_Access is
24      new Ada.Unchecked_Conversion (System.Address, Natural_Access);
25
26   Ptr : Natural_Access;
27
28   procedure N_Probes_For (Link : Link_Access)  is
29   begin
30      Ptr := To_Natural_Access (Link.N_Probes'address);
31      Ptr := To_Natural_Access (Link.Initialized'address);
32   end;
33
34begin
35   null;
36end;
37