summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/rep_clause7.adb
blob: 222b8f5c43be363df2895b339c59114aeade4df7 (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
procedure Rep_Clause7 is

   subtype Msg is String (1 .. 3);

   type Root is tagged record
     B : Boolean;
     M : Msg;
   end record;
   for Root use record
     B at 0 range 64 .. 64;
     M at 0 range 65 .. 88;
   end record;

   type Ext is new Root with null record;

   procedure Inner (T : Msg) is
   begin
      null;
   end;

   pragma Warnings (Off);
   T1 : Root;
   T2 : Ext;
   pragma Warnings (On);

begin
   Inner (T1.M);
   Inner (T2.M);
end;