1-- { dg-do compile }
2
3with Interfaces.C; use Interfaces.C;
4
5procedure Object_Overflow2 is
6
7  procedure Proc (x : Boolean) is begin null; end;
8
9  type Arr is array(0 .. ptrdiff_t'Last) of Boolean;
10  Obj : Arr; -- { dg-warning "Storage_Error" }
11
12begin
13  Obj(1) := True;
14  Proc (Obj(1));
15end;
16