aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2016-01-03 22:01:31 +0100
committerTristan Gingold <gingold@adacore.com>2016-01-03 22:01:31 +0100
commitf0ebc51e46d4d2eb8c6537307301eed85c071db3 (patch)
tree2b876d157d07840f03cd5c79ae041368679c2507
parente3c9103b4c6e5bd3d3d8d4a053b7a6c05ff55aeb (diff)
downloadghdl-f0ebc51e46d4d2eb8c6537307301eed85c071db3.tar.gz
ghdl-f0ebc51e46d4d2eb8c6537307301eed85c071db3.tar.bz2
ghdl-f0ebc51e46d4d2eb8c6537307301eed85c071db3.zip
Add reproducer for issue10.
-rw-r--r--testsuite/gna/issue10/test_id.vhdl19
-rwxr-xr-xtestsuite/gna/issue10/testsuite.sh10
2 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/gna/issue10/test_id.vhdl b/testsuite/gna/issue10/test_id.vhdl
new file mode 100644
index 000000000..954c6393b
--- /dev/null
+++ b/testsuite/gna/issue10/test_id.vhdl
@@ -0,0 +1,19 @@
+entity test_id is
+end entity;
+
+architecture rtl of test_id is
+ type T_TUPLE is record
+ A : NATURAL;
+ B : NATURAL;
+ end record;
+ type T_VECTOR is array (NATURAL range <>) of T_TUPLE;
+
+ constant LIST : T_VECTOR := ((8, 32), (8, 20), (8, 36));
+begin
+ genTests : for i in LIST'range generate
+ constant LOCAL_A : NATURAL := LIST(i).A;
+ constant LOCAL_B : NATURAL := LIST(i).B;
+ begin
+ -- my tests
+ end generate;
+end architecture;
diff --git a/testsuite/gna/issue10/testsuite.sh b/testsuite/gna/issue10/testsuite.sh
new file mode 100755
index 000000000..e40366d6e
--- /dev/null
+++ b/testsuite/gna/issue10/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure --std=93 test_id.vhdl
+analyze test_id.vhdl
+
+clean
+
+echo "Test successful"