aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-01-19 19:55:37 +0100
committerTristan Gingold <tgingold@free.fr>2016-01-19 19:55:37 +0100
commitcad4bda6a8c85c8103216324307206197152c417 (patch)
tree30deb22406276bfacd23ed789981e6d652c0194f /testsuite
parent2fae5481006fafb916675c528a7ee230be89ec0b (diff)
downloadghdl-cad4bda6a8c85c8103216324307206197152c417.tar.gz
ghdl-cad4bda6a8c85c8103216324307206197152c417.tar.bz2
ghdl-cad4bda6a8c85c8103216324307206197152c417.zip
Add reproducer for bug24326.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug24326/repro1.vhdl7
-rw-r--r--testsuite/gna/bug24326/tb_thingy7.vhdl27
-rw-r--r--testsuite/gna/bug24326/tb_thingy9.vhdl27
-rwxr-xr-xtestsuite/gna/bug24326/testsuite.sh11
4 files changed, 72 insertions, 0 deletions
diff --git a/testsuite/gna/bug24326/repro1.vhdl b/testsuite/gna/bug24326/repro1.vhdl
new file mode 100644
index 000000000..624a7a7d8
--- /dev/null
+++ b/testsuite/gna/bug24326/repro1.vhdl
@@ -0,0 +1,7 @@
+entity repro1 is
+end;
+
+architecture behav of repro1 is
+ constant c : natural := 5 % 4;
+begin
+end;
diff --git a/testsuite/gna/bug24326/tb_thingy7.vhdl b/testsuite/gna/bug24326/tb_thingy7.vhdl
new file mode 100644
index 000000000..6df4205ca
--- /dev/null
+++ b/testsuite/gna/bug24326/tb_thingy7.vhdl
@@ -0,0 +1,27 @@
+entity tb_thingy is
+end tb_thingy;
+
+architecture tb of tb_thingy is
+ component thingy is
+ generic (
+ a_a : integer
+ );
+ port (
+ x_x : in bit;
+ y_y : out bit
+ );
+ end component;
+ signal stimuli : bit;
+ signal response : bit;
+begin
+
+ dut : thingy
+ generic map (
+ a_a => 42
+ )
+ port map (
+ x%x => stimuli, -- <==
+ y_y => response
+ );
+
+end tb;
diff --git a/testsuite/gna/bug24326/tb_thingy9.vhdl b/testsuite/gna/bug24326/tb_thingy9.vhdl
new file mode 100644
index 000000000..493b20d38
--- /dev/null
+++ b/testsuite/gna/bug24326/tb_thingy9.vhdl
@@ -0,0 +1,27 @@
+entity tb_thingy is
+end tb_thingy;
+
+architecture tb of tb_thingy is
+ component thingy is
+ generic (
+ a_a : integer
+ );
+ port (
+ x%x : in bit; -- <==
+ y_y : out bit
+ );
+ end component;
+ signal stimuli : bit;
+ signal response : bit;
+begin
+
+ dut : thingy
+ generic map (
+ a_a => 42
+ )
+ port map (
+ x_x => stimuli,
+ y_y => response
+ );
+
+end tb;
diff --git a/testsuite/gna/bug24326/testsuite.sh b/testsuite/gna/bug24326/testsuite.sh
new file mode 100755
index 000000000..a30c5a09b
--- /dev/null
+++ b/testsuite/gna/bug24326/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure tb_thingy7.vhdl
+analyze_failure tb_thingy9.vhdl
+analyze_failure repro1.vhdl
+
+clean
+
+echo "Test successful"