aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.3/gcc/testsuite/gnat.dg/controlled7.adb
blob: bdcf67ac466087546d1690424aa8e1d96c104699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- PR ada/53766
-- Reported by Duncan Sands <baldrick@gcc.gnu.org>

-- { dg-do compile }
-- { dg-options "-gnatp" }

with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

package body Controlled7 is

   procedure Proc (Offset : Storage_Offset) is
   begin
      if Offset + Unbounded_String'Max_Size_In_Storage_Elements >= 16 then
         raise Program_Error;
      end if;
   end;

end Controlled7;