From 11171d290bfa5a5d517faf27dacaaaeae72cc099 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 25 Jan 2023 21:10:26 +0100 Subject: testsuite/issue2323: add more tests --- testsuite/gna/issue2323/st3.vhdl | 9 +++++++++ testsuite/gna/issue2323/st4.vhdl | 9 +++++++++ testsuite/gna/issue2323/testsuite.sh | 9 +++++++++ 3 files changed, 27 insertions(+) create mode 100644 testsuite/gna/issue2323/st3.vhdl create mode 100644 testsuite/gna/issue2323/st4.vhdl 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" -- cgit v1.2.3