aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs/opt1.ads
blob: 89a405c3457798c638aa2b75ae49617a9e5a1449 (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
-- { dg-do compile }
-- { dg-options "-O2" }

with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

package Opt1 is

   type Ptr is access all Integer;

   type R1 is record
      I1 : Integer;
      I2 : Integer := 0;
      I3 : Integer;
   end record;

   type R2 is record
      P  : Ptr;
      F1 : R1;
   end record;

   type R3 is record
      S  : Unbounded_String;
      F1 : R2;
      I  : Integer := 0;
      F2 : R2;
   end record;

end Opt1;