Add config file so b4 uses inbox.sourceware.org automatically
[official-gcc.git] / gcc / testsuite / gnat.dg / object_overflow5.adb
blob42d00b24b9548eda3c3080263449f2d000d95de2
1 -- { dg-do compile }
3 with Interfaces.C; use Interfaces.C;
5 procedure Object_Overflow5 is
7 procedure Proc (c : Character) is begin null; end;
9 type Index_T is new ptrdiff_t range 0 .. ptrdiff_t'Last;
11 type Arr is array(Index_T range <>) of Character;
13 type Rec (Size: Index_T := 6) is record -- { dg-warning "Storage_Error" }
14 A: Arr (0..Size);
15 end record;
17 Obj : Rec; -- { dg-warning "Storage_Error" }
19 begin
20 Obj.A(1) := 'a';
21 Proc (Obj.A(1));
22 end;