summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gnat.dg/renaming3.adb12
-rw-r--r--gcc/testsuite/gnat.dg/renaming4.ads15
3 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd0a5285570..3114824ecc6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
+ * gnat.dg/renaming3.adb, renaming4.ads: New test.
+
+2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
+
* gnat.dg/unaligned_rep_clause.adb: New testcase.
2007-09-08 Dorit Nuzman <dorit@il.ibm.com>
diff --git a/gcc/testsuite/gnat.dg/renaming3.adb b/gcc/testsuite/gnat.dg/renaming3.adb
new file mode 100644
index 00000000000..335a2122121
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/renaming3.adb
@@ -0,0 +1,12 @@
+-- { dg-do run }
+
+with Renaming4; use Renaming4;
+
+procedure Renaming3 is
+ type A is array(1..16) of Integer;
+ Filler : A := (others => 0);
+begin
+ if B(1) /= 1 then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/renaming4.ads b/gcc/testsuite/gnat.dg/renaming4.ads
new file mode 100644
index 00000000000..4fdc9c10882
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/renaming4.ads
@@ -0,0 +1,15 @@
+package Renaming4 is
+
+ type Big_Array is array (Natural range <>) of Integer;
+
+ subtype Index is Natural range 1..4;
+ subtype My_Array is Big_Array(Index);
+
+ A : constant My_Array := (1, 2, 3, 4);
+
+ subtype Small is Index range 1..2;
+ subtype Small_Array is Big_Array(Small);
+
+ B : Small_Array renames A(Index);
+
+end Renaming4;