diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-06 08:02:17 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-06 08:02:17 +0100 |
commit | 3418818682c5612fbb02641754dd78479f39d58c (patch) | |
tree | 55a6db74eb264e0da385c0e66b5f638aeec536d4 | |
parent | 0e4a4280f05604821c1c7719b3d9486bf11af5ce (diff) | |
download | ghdl-3418818682c5612fbb02641754dd78479f39d58c.tar.gz ghdl-3418818682c5612fbb02641754dd78479f39d58c.tar.bz2 ghdl-3418818682c5612fbb02641754dd78479f39d58c.zip |
Add a testcase for #1152
-rw-r--r-- | testsuite/gna/issue1152/ent.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/gna/issue1152/testsuite.sh | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/gna/issue1152/ent.vhdl b/testsuite/gna/issue1152/ent.vhdl new file mode 100644 index 000000000..7c133e0a3 --- /dev/null +++ b/testsuite/gna/issue1152/ent.vhdl @@ -0,0 +1,19 @@ +entity ent is +end; + +architecture arch of ent is + + type range_t is array (integer range <>) of bit; + + function get_range (constant code : string) return range_t is + constant ret_val : range_t(1 to 10) := (others => '0'); + begin + return ret_val; + end function get_range; + + signal ret_val : boolean_vector(get_range("HELLO")'range) := (others => false); + + --constant ret_range : range_t := get_range("HELLO"); + --signal ret_val : boolean_vector(ret_range) := (others => false); +begin +end; diff --git a/testsuite/gna/issue1152/testsuite.sh b/testsuite/gna/issue1152/testsuite.sh new file mode 100755 index 000000000..1f162e2d2 --- /dev/null +++ b/testsuite/gna/issue1152/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze_failure ent.vhdl +analyze -frelaxed ent.vhdl + +clean + +echo "Test successful" |