diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-12-15 18:11:38 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-12-15 18:11:38 +0000 |
commit | 4e8661cd7c5ef423c34723483a9ac5cf7b65169c (patch) | |
tree | 004a9fd7f60b64b40b844fc9a6ff1435783d143f | |
parent | c3d79c606a2cd3647c77d2893abd643ecf41f250 (diff) | |
download | gcc-4e8661cd7c5ef423c34723483a9ac5cf7b65169c.zip gcc-4e8661cd7c5ef423c34723483a9ac5cf7b65169c.tar.gz gcc-4e8661cd7c5ef423c34723483a9ac5cf7b65169c.tar.bz2 |
re PR ada/53766 (ICE in build_binary_op on Max_Size_In_Storage_Elements with -gnatp)
PR ada/53766
* gnat.dg/controlled7.ad[sb]: New test.
From-SVN: r194521
-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 e3776f3..fc21c18 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 0000000..bdcf67a --- /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 0000000..672a8e7 --- /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; |