diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-25 21:10:26 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-26 21:56:27 +0100 |
commit | 11171d290bfa5a5d517faf27dacaaaeae72cc099 (patch) | |
tree | f1d1637a5c0a277174d72d3df73172fec8405fad | |
parent | 7c2d3d4a419be583e46f0c8a84c26a86b696da3a (diff) | |
download | ghdl-11171d290bfa5a5d517faf27dacaaaeae72cc099.tar.gz ghdl-11171d290bfa5a5d517faf27dacaaaeae72cc099.tar.bz2 ghdl-11171d290bfa5a5d517faf27dacaaaeae72cc099.zip |
testsuite/issue2323: add more tests
-rw-r--r-- | testsuite/gna/issue2323/st3.vhdl | 9 | ||||
-rw-r--r-- | testsuite/gna/issue2323/st4.vhdl | 9 | ||||
-rwxr-xr-x | testsuite/gna/issue2323/testsuite.sh | 9 |
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" |