2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / stack_check3.adb
blob734ed4227337e19f19210cc910e19a284c566332
1 -- { dg-do compile }
2 -- { dg-options "-O -fstack-check" }
4 package body Stack_Check3 is
6 type Int_Arr is array (1 .. 34) of Integer;
8 type Rec (D : Boolean := False) is
9 record
10 case D is
11 when True => IA : Int_Arr;
12 when False => null;
13 end case;
14 end record;
16 type Rec_Arr is array (1 .. 256) of Rec;
18 protected Prot_Arr is
19 procedure Reset;
20 private
21 A : Rec_Arr;
22 end Prot_Arr;
24 protected body Prot_Arr is
25 procedure Reset is
26 begin
27 A := (others => (D => False));
28 end Reset;
29 end Prot_Arr;
31 procedure Reset is
32 begin
33 Prot_Arr.Reset;
34 end Reset;
36 end Stack_Check3;