aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue788
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-15 20:41:27 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-15 20:41:27 +0200
commitd5d8471efc3ef7586035ebc57a41f420621d4343 (patch)
treef8578fe47145d143c27f16b44f83da234a59a81d /testsuite/gna/issue788
parent6133111653ce0734aa999a9b67a049873a94c9c2 (diff)
downloadghdl-d5d8471efc3ef7586035ebc57a41f420621d4343.tar.gz
ghdl-d5d8471efc3ef7586035ebc57a41f420621d4343.tar.bz2
ghdl-d5d8471efc3ef7586035ebc57a41f420621d4343.zip
Add testcase for #788
Diffstat (limited to 'testsuite/gna/issue788')
-rw-r--r--testsuite/gna/issue788/repro.vhdl29
-rwxr-xr-xtestsuite/gna/issue788/testsuite.sh11
2 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/issue788/repro.vhdl b/testsuite/gna/issue788/repro.vhdl
new file mode 100644
index 000000000..f6bbc8899
--- /dev/null
+++ b/testsuite/gna/issue788/repro.vhdl
@@ -0,0 +1,29 @@
+entity repro is
+end repro;
+
+architecture behav of repro is
+ type word_vector is array (natural range <>) of bit_vector (7 downto 0);
+
+ type trans is record
+ header : natural;
+ bod : word_vector;
+ end record;
+
+ signal s : trans (bod(0 to 3));
+
+ procedure check (t1 : trans) is
+ begin
+ assert t1.header = 0;
+ end check;
+
+ procedure check2 (signal t : trans) is
+ begin
+ check (t);
+ end check2;
+begin
+ process
+ begin
+ check2 (s);
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue788/testsuite.sh b/testsuite/gna/issue788/testsuite.sh
new file mode 100755
index 000000000..8d22a2073
--- /dev/null
+++ b/testsuite/gna/issue788/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"