aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-02-24 19:44:07 +0100
committerTristan Gingold <tgingold@free.fr>2017-02-24 19:44:07 +0100
commit869554c72cbb5ae20a33ca0eeb6491913367c45e (patch)
tree540de6f3f84e3f248f346715a529389a8ebe8074 /testsuite
parenta1567ab51d27b9a660d795282be41aadee48b4e2 (diff)
downloadghdl-869554c72cbb5ae20a33ca0eeb6491913367c45e.tar.gz
ghdl-869554c72cbb5ae20a33ca0eeb6491913367c45e.tar.bz2
ghdl-869554c72cbb5ae20a33ca0eeb6491913367c45e.zip
Add testcase for #273
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue273/tb.vhdl20
-rwxr-xr-xtestsuite/gna/issue273/testsuite.sh11
2 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/gna/issue273/tb.vhdl b/testsuite/gna/issue273/tb.vhdl
new file mode 100644
index 000000000..fc4d58eb8
--- /dev/null
+++ b/testsuite/gna/issue273/tb.vhdl
@@ -0,0 +1,20 @@
+entity test is
+end test;
+
+architecture tb of test is
+begin
+ process
+ variable a : integer range 7 downto 0;
+ variable b : a'subtype;
+ variable av : bit_vector(7 downto 0);
+ variable bv : av'subtype;
+ begin
+ report integer'image(b'subtype'left);
+ report integer'image(bv'left);
+
+ -- The following line crashes the analysis.
+ report integer'image(av'subtype'left);
+
+ wait; -- forever
+ end process;
+end tb;
diff --git a/testsuite/gna/issue273/testsuite.sh b/testsuite/gna/issue273/testsuite.sh
new file mode 100755
index 000000000..78d61e163
--- /dev/null
+++ b/testsuite/gna/issue273/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze tb.vhdl
+elab_simulate test
+
+clean
+
+echo "Test successful"