gcc/testsuite/gnat.dg/specs/opt1.ads
raw| 1 | -- { dg-do compile } |
| 2 | -- { dg-options "-O2" } |
| 3 | |
| 4 | with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; |
| 5 | |
| 6 | package Opt1 is |
| 7 | |
| 8 | type Ptr is access all Integer; |
| 9 | |
| 10 | type R1 is record |
| 11 | I1 : Integer; |
| 12 | I2 : Integer := 0; |
| 13 | I3 : Integer; |
| 14 | end record; |
| 15 | |
| 16 | type R2 is record |
| 17 | P : Ptr; |
| 18 | F1 : R1; |
| 19 | end record; |
| 20 | |
| 21 | type R3 is record |
| 22 | S : Unbounded_String; |
| 23 | F1 : R2; |
| 24 | I : Integer := 0; |
| 25 | F2 : R2; |
| 26 | end record; |
| 27 | |
| 28 | end Opt1; |