PR ipa/83051
[official-gcc.git] / gcc / testsuite / gnat.dg / object_overflow3.adb
blob5e27b4f0d81da0e6093de3d81cce4e6156d820e4
1 -- { dg-do compile }
3 procedure Object_Overflow3 is
5 procedure Proc (x : Boolean) is begin null; end;
7 type Arr is array(0 .. Long_Integer'Last) of Boolean;
9 type Rec is record
10 A : Arr;
11 B : Arr;
12 end record;
14 Obj : Rec; -- { dg-warning "Storage_Error" }
16 begin
17 Obj.A(1) := True;
18 Proc (Obj.A(1));
19 end;