gcc/testsuite/gnat.dg/discr57.adb
raw| 1 | -- { dg-do compile } |
| 2 | |
| 3 | procedure Discr57 is |
| 4 | |
| 5 | type T1(Scalar : Boolean) is abstract tagged null record; |
| 6 | |
| 7 | subtype S1 is T1 (Scalar => False); |
| 8 | |
| 9 | type T2(Lower_Bound : Natural) is new |
| 10 | S1 with null record; |
| 11 | |
| 12 | Obj : constant T2 := |
| 13 | (Lower_Bound => 123); |
| 14 | |
| 15 | begin |
| 16 | null; |
| 17 | end Discr57; |