aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-06-19 20:45:00 +0200
committerTristan Gingold <tgingold@free.fr>2017-06-19 20:45:00 +0200
commit5338523d5109fbb29d74da91241f1a9f2f8dc653 (patch)
treea32dc5dfc247cc6ab287cb2cec77d6634f8f4426 /testsuite/gna
parent620ddf92b9d72e9dc39e03ea0f6b3b33cf75363f (diff)
downloadghdl-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.vhdl26
-rwxr-xr-xtestsuite/gna/issue370/testsuite.sh11
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"