* gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
[official-gcc.git] / gcc / testsuite / gnat.dg / opt49.adb
blob42ab953a2e05f0237bdc00359510665012681d42
1 -- { dg-do run }
2 -- { dg-require-stack-check "" }
3 -- { dg-options "-O -fstack-check" }
5 procedure Opt49 is
7 function Ident (I : Integer) return Integer;
8 pragma No_Inline (Ident);
10 function Ident (I : Integer) return Integer is
11 begin
12 return I;
13 end;
15 Int_0 : Integer := Ident (0);
16 Int_4 : Integer := Ident (4);
18 A : array (-4 .. Int_4) of Integer;
20 begin
21 A := (-4 , -3 , -2 , -1 , 100 , 1 , 2 , 3 , 4);
22 A (-4 .. Int_0) := A (Int_0 .. 4);
23 if A /= (100 , 1 , 2 , 3 , 4 , 1 , 2 , 3 , 4) then
24 raise Program_Error;
25 end if;
27 A := (-4 , -3 , -2 , -1 , 100 , 1 , 2 , 3 , 4);
28 A (Int_0 .. 4) := A (-4 .. Int_0);
29 if A /= (-4 , -3 , -2 , -1 , -4 , -3 , -2 , -1 , 100) then
30 raise Program_Error;
31 end if;
32 end;