aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1080
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-11 18:13:12 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-12 09:15:38 +0100
commit5b62240d233c9c122c9fa2715e4d9bba677fe7cd (patch)
treee6f3b65bde69179782aae9ffda7f3a3151bdf238 /testsuite/synth/issue1080
parent88215549497e4ec8f1e55325a87e3155626a8a3b (diff)
downloadghdl-5b62240d233c9c122c9fa2715e4d9bba677fe7cd.tar.gz
ghdl-5b62240d233c9c122c9fa2715e4d9bba677fe7cd.tar.bz2
ghdl-5b62240d233c9c122c9fa2715e4d9bba677fe7cd.zip
testsuite/synth: add test for #1080
Diffstat (limited to 'testsuite/synth/issue1080')
-rw-r--r--testsuite/synth/issue1080/repro.vhdl26
-rwxr-xr-xtestsuite/synth/issue1080/testsuite.sh11
2 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/synth/issue1080/repro.vhdl b/testsuite/synth/issue1080/repro.vhdl
new file mode 100644
index 000000000..f9073c8fd
--- /dev/null
+++ b/testsuite/synth/issue1080/repro.vhdl
@@ -0,0 +1,26 @@
+entity repro_sub is
+ generic (
+ val : natural := 10);
+ port (
+ a : natural := val;
+ b : out natural);
+end repro_sub;
+
+architecture behav of repro_sub is
+begin
+ b <= a + 1;
+end behav;
+
+entity repro is
+ port (
+ a : natural;
+ b : out natural);
+end repro;
+
+architecture rtl of repro is
+begin
+ dut: entity work.repro_sub
+ port map (b => b);
+end rtl;
+
+
diff --git a/testsuite/synth/issue1080/testsuite.sh b/testsuite/synth/issue1080/testsuite.sh
new file mode 100755
index 000000000..0e3851e6b
--- /dev/null
+++ b/testsuite/synth/issue1080/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+for t in repro; do
+ synth $t.vhdl -e $t > syn_$t.vhdl
+ analyze syn_$t.vhdl
+ clean
+done
+
+echo "Test successful"