gcc/testsuite/gnat.dg/specs/elab2_pkg.ads
raw| 1 | -- { dg-excess-errors "no code generated" } |
| 2 | |
| 3 | package Elab2_Pkg is |
| 4 | |
| 5 | function Get_Value (S : String) return Integer; |
| 6 | |
| 7 | Max_Limit : constant array(1..2) of Integer := |
| 8 | (1 => Get_Value ("One"), 2 => Get_Value ("Two")); |
| 9 | |
| 10 | type Index_Type is new Natural range 0 .. Max_Limit(1); |
| 11 | |
| 12 | type Array_Type is array (Index_Type range <>) of Natural; |
| 13 | |
| 14 | type Rec1(D : Index_Type) is record |
| 15 | A : Array_Type(1 .. D); |
| 16 | end record; |
| 17 | |
| 18 | end Elab2_Pkg; |