2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / opt13_pkg.adb
blob850022766fc331110341eac78372f51b5242ee8d
1 package body Opt13_Pkg is
3 subtype Index_Type is Natural range 0 .. 16;
5 type Arr is array (Index_Type range <>) of Integer;
7 type Rec is record
8 F1, F2, F3 : Float;
9 N : Natural;
10 B1, B2 : Boolean;
11 F4 : Float;
12 end record;
14 type Data (D : Index_Type) is record
15 A : Arr (1 .. D);
16 R : Rec;
17 end record;
19 Zero : constant Rec := (0.0, 0.0, 0.0, 0, False, False, 0.0);
21 procedure Allocate (T : out My_Type) is
22 begin
23 T := new Data (Index_Type'last);
24 T.R := Zero;
26 for I in 1 .. T.A'last loop
27 N := 1;
28 end loop;
29 end;
31 end Opt13_Pkg;