diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-19 20:45:00 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-19 20:45:00 +0200 |
commit | 5338523d5109fbb29d74da91241f1a9f2f8dc653 (patch) | |
tree | a32dc5dfc247cc6ab287cb2cec77d6634f8f4426 /testsuite/gna | |
parent | 620ddf92b9d72e9dc39e03ea0f6b3b33cf75363f (diff) | |
download | ghdl-5338523d5109fbb29d74da91241f1a9f2f8dc653.tar.gz ghdl-5338523d5109fbb29d74da91241f1a9f2f8dc653.tar.bz2 ghdl-5338523d5109fbb29d74da91241f1a9f2f8dc653.zip |
Add reproducer for #370
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue370/repro.vhdl | 26 | ||||
-rwxr-xr-x | testsuite/gna/issue370/testsuite.sh | 11 |
2 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/gna/issue370/repro.vhdl b/testsuite/gna/issue370/repro.vhdl new file mode 100644 index 000000000..2a69be06f --- /dev/null +++ b/testsuite/gna/issue370/repro.vhdl @@ -0,0 +1,26 @@ +entity repro is +end; + +architecture behav of repro is + function f return natural is + begin + return 5; + end f; + + constant cst : natural := f; + + type rec1 is record + r : bit_vector (1 to cst); + end record; + + type rec is record + v : bit_vector; + r : rec1; + end record; + + procedure assign (signal s : out rec; val : rec) is + begin + s <= val; + end assign; +begin +end behav; diff --git a/testsuite/gna/issue370/testsuite.sh b/testsuite/gna/issue370/testsuite.sh new file mode 100755 index 000000000..8d22a2073 --- /dev/null +++ b/testsuite/gna/issue370/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze repro.vhdl +elab_simulate repro + +clean + +echo "Test successful" |