aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2015-10-28 22:33:46 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-10-28 22:33:46 +0000
commitb2fb03eb24256ab8c39516f5f1189e0d50c6f9cd (patch)
treea88451891191c321b2c78f3feb6c3f7160c0bebe /gcc
parent38b882b5421ed6480468e458d24f3cbcfc67f26b (diff)
downloadgcc-b2fb03eb24256ab8c39516f5f1189e0d50c6f9cd.zip
gcc-b2fb03eb24256ab8c39516f5f1189e0d50c6f9cd.tar.gz
gcc-b2fb03eb24256ab8c39516f5f1189e0d50c6f9cd.tar.bz2
* gnat.dg/discr44.adb: New test.
From-SVN: r229508
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gnat.dg/discr44.adb27
2 files changed, 33 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 711fbb5..43f6007 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,8 @@
-2015-10-26 Jim Wilson <jim.wilson@linaro.org>
+2015-10-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr44.adb: New test.
+
+2015-10-28 Jim Wilson <jim.wilson@linaro.org>
PR debug/66068
* gcc.dg/debug/pr66068.c: New test.
@@ -16,7 +20,7 @@
* gcc.target/mips/oddspreg-1.c: Likewise.
* gcc.target/mips/oddspreg-2.c: Likewise.
-2015-10-05 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+2015-10-28 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
PR target/67839
* gcc.target/avr/pr67839.c: New test.
diff --git a/gcc/testsuite/gnat.dg/discr44.adb b/gcc/testsuite/gnat.dg/discr44.adb
new file mode 100644
index 0000000..ea9f5b1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr44.adb
@@ -0,0 +1,27 @@
+-- { dg-do run }
+-- { dg-options "-gnatws" }
+
+procedure Discr44 is
+
+ function Ident (I : Integer) return Integer is
+ begin
+ return I;
+ end;
+
+ type Int is range 1 .. 10;
+
+ type Str is array (Int range <>) of Character;
+
+ type Parent (D1, D2 : Int; B : Boolean) is record
+ S : Str (D1 .. D2);
+ end record;
+
+ type Derived (D : Int) is new Parent (D1 => D, D2 => D, B => False);
+
+ X1 : Derived (D => Int (Ident (7)));
+
+begin
+ if X1.D /= 7 then
+ raise Program_Error;
+ end if;
+end;