aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1415
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-29 07:49:00 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-29 18:27:58 +0200
commit1b789a5fb8b11e7c378731589d9cb54a8f53c27f (patch)
treefe0f8b6be7459e5be5810802ff8dd8c929ddaca6 /testsuite/gna/issue1415
parentbf5cc4bbe3e7faa242b316b1d4f3940e6119e61d (diff)
downloadghdl-1b789a5fb8b11e7c378731589d9cb54a8f53c27f.tar.gz
ghdl-1b789a5fb8b11e7c378731589d9cb54a8f53c27f.tar.bz2
ghdl-1b789a5fb8b11e7c378731589d9cb54a8f53c27f.zip
testsuite/gna: add a reproducer for #1415
Diffstat (limited to 'testsuite/gna/issue1415')
-rw-r--r--testsuite/gna/issue1415/repro.vhdl27
-rwxr-xr-xtestsuite/gna/issue1415/testsuite.sh11
2 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/gna/issue1415/repro.vhdl b/testsuite/gna/issue1415/repro.vhdl
new file mode 100644
index 000000000..b1ff6d94c
--- /dev/null
+++ b/testsuite/gna/issue1415/repro.vhdl
@@ -0,0 +1,27 @@
+package repro_pkg is
+ type wishbone_type is record
+ data : bit_vector;
+ stb : bit;
+ end record;
+end;
+
+entity reprob is
+ port (b : bit_vector);
+end;
+
+architecture behav of reprob is
+begin
+ assert b'length = 4;
+end;
+
+use work.repro_pkg.all;
+
+entity repro is
+end repro;
+
+architecture behav of repro is
+ signal s : wishbone_type (data(3 downto 0));
+begin
+ dut: entity work.reprob
+ port map (b => s.data);
+end behav;
diff --git a/testsuite/gna/issue1415/testsuite.sh b/testsuite/gna/issue1415/testsuite.sh
new file mode 100755
index 000000000..8d22a2073
--- /dev/null
+++ b/testsuite/gna/issue1415/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"