diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/controlled7.adb | 18 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/controlled7.ads | 7 |
3 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e3776f340bc..fc21c18bae9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-12-15 Eric Botcazou <ebotcazou@adacore.com> + + PR ada/53766 + * gnat.dg/controlled7.ad[sb]: New test. + 2012-12-14 Steve Ellcey <sellcey@mips.com> PR regression/55688 diff --git a/gcc/testsuite/gnat.dg/controlled7.adb b/gcc/testsuite/gnat.dg/controlled7.adb new file mode 100644 index 00000000000..bdcf67ac466 --- /dev/null +++ b/gcc/testsuite/gnat.dg/controlled7.adb @@ -0,0 +1,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; diff --git a/gcc/testsuite/gnat.dg/controlled7.ads b/gcc/testsuite/gnat.dg/controlled7.ads new file mode 100644 index 00000000000..672a8e7a721 --- /dev/null +++ b/gcc/testsuite/gnat.dg/controlled7.ads @@ -0,0 +1,7 @@ +with System.Storage_Elements; use System.Storage_Elements; + +package Controlled7 is + + procedure Proc (Offset : Storage_Offset); + +end Controlled7; |