Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gnat.dg / object_overflow4.adb
blob643989d348cd2d7a5398bd4bf8f4fbcd15cbb3ef
1 -- { dg-do compile }
3 procedure Object_Overflow4 is
5 procedure Proc (x : Integer) is begin null; end;
7 type Index is new Long_Integer range 0 .. Long_Integer'Last;
9 type Arr is array(Index range <>) of Integer;
11 type Rec (Size: Index := 6) is record -- { dg-warning "Storage_Error" }
12 A: Arr (0..Size);
13 end record;
15 Obj : Rec; -- { dg-warning "Storage_Error" }
17 begin
18 Obj.A(1) := 0;
19 Proc (Obj.A(1));
20 end;