1-- { dg-do compile }
2
3procedure Object_Overflow3 is
4
5  procedure Proc (x : Boolean) is begin null; end;
6
7  type Arr is array(0 .. Long_Integer'Last) of Boolean;
8
9  type Rec is record
10    A : Arr;
11    B : Arr;
12  end record;
13
14  Obj : Rec; -- { dg-warning "Storage_Error" }
15
16begin
17  Obj.A(1) := True;
18  Proc (Obj.A(1));
19end;
20