aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue2323/st3.vhdl9
-rw-r--r--testsuite/gna/issue2323/st4.vhdl9
-rwxr-xr-xtestsuite/gna/issue2323/testsuite.sh9
3 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue2323/st3.vhdl b/testsuite/gna/issue2323/st3.vhdl
new file mode 100644
index 000000000..00a4e3a76
--- /dev/null
+++ b/testsuite/gna/issue2323/st3.vhdl
@@ -0,0 +1,9 @@
+entity st3 is
+end;
+
+architecture arch of st3 is
+ type my_bv4 is array (natural range <>) of bit_vector(1 to 4);
+ subtype mypos is natural range my_bv4'element'range;
+ subtype my2 is mypos range 2 to 5;
+begin
+end arch;
diff --git a/testsuite/gna/issue2323/st4.vhdl b/testsuite/gna/issue2323/st4.vhdl
new file mode 100644
index 000000000..75e50dbd9
--- /dev/null
+++ b/testsuite/gna/issue2323/st4.vhdl
@@ -0,0 +1,9 @@
+entity st4 is
+end;
+
+architecture arch of st4 is
+ constant v : string (1 to 5) := "hello";
+ subtype mypos is natural range v'subtype'range;
+ subtype my2 is mypos range 2 to 6;
+begin
+end arch;
diff --git a/testsuite/gna/issue2323/testsuite.sh b/testsuite/gna/issue2323/testsuite.sh
index 5bd7edc12..80d20016f 100755
--- a/testsuite/gna/issue2323/testsuite.sh
+++ b/testsuite/gna/issue2323/testsuite.sh
@@ -13,4 +13,13 @@ elab_simulate_failure st2
clean
+export GHDL_STD_FLAGS=--std=08
+analyze st3.vhdl
+elab_simulate_failure st3
+
+analyze st4.vhdl
+elab_simulate_failure st4
+
+clean
+
echo "Test successful"