1-- PR ada/53766 2-- Reported by Duncan Sands <baldrick@gcc.gnu.org> 3 4-- { dg-do compile } 5-- { dg-options "-gnatp" } 6 7with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; 8 9package body Controlled7 is 10 11 procedure Proc (Offset : Storage_Offset) is 12 begin 13 if Offset + Unbounded_String'Max_Size_In_Storage_Elements >= 16 then 14 raise Program_Error; 15 end if; 16 end; 17 18end Controlled7; 19