summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-15 18:11:38 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-15 18:11:38 +0000
commit4a03cc91761bf48b3e1d0407e0bafd0bdf1fb327 (patch)
tree004a9fd7f60b64b40b844fc9a6ff1435783d143f /gcc/testsuite
parent84f43acca2613efaa0f8d31dce517d35a7e7aa64 (diff)
downloadgcc-4a03cc91761bf48b3e1d0407e0bafd0bdf1fb327.tar.gz
PR ada/53766
* gnat.dg/controlled7.ad[sb]: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194521 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gnat.dg/controlled7.adb18
-rw-r--r--gcc/testsuite/gnat.dg/controlled7.ads7
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;