Debian Codegraph @

gcc/testsuite/gnat.dg/controlled7.adb

raw
1 -- PR ada/53766
2 -- Reported by Duncan Sands <[email protected]>
3
4 -- { dg-do compile }
5 -- { dg-options "-gnatp" }
6
7 with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
8
9 package 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
18 end Controlled7;