aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-10-18 18:43:49 +0200
committerTristan Gingold <tgingold@free.fr>2022-10-18 18:43:49 +0200
commitfa0f97b6416f1015823f574f52c1343eb9058e16 (patch)
treece869ee6da364fca1c81ef1f647e6417a765245b /testsuite/synth
parent2902470d5fd35fdfdca1240ec76e7beea4b47ef2 (diff)
downloadghdl-fa0f97b6416f1015823f574f52c1343eb9058e16.tar.gz
ghdl-fa0f97b6416f1015823f574f52c1343eb9058e16.tar.bz2
ghdl-fa0f97b6416f1015823f574f52c1343eb9058e16.zip
testsuite/synth: add a test for #2222
Diffstat (limited to 'testsuite/synth')
-rw-r--r--testsuite/synth/issue2222/ent.vhdl21
-rwxr-xr-xtestsuite/synth/issue2222/testsuite.sh7
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/synth/issue2222/ent.vhdl b/testsuite/synth/issue2222/ent.vhdl
new file mode 100644
index 000000000..342713dc8
--- /dev/null
+++ b/testsuite/synth/issue2222/ent.vhdl
@@ -0,0 +1,21 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity ent is
+ port (o : out std_ulogic);
+end;
+
+architecture a of ent is
+ procedure proc (
+ signal pin : out std_ulogic;
+ constant drive_pin : boolean := false
+ ) is
+ begin
+ if drive_pin then
+ pin <= '1';
+ end if;
+ end procedure;
+begin
+ o <= '1';
+ proc(pin => o);
+end;
diff --git a/testsuite/synth/issue2222/testsuite.sh b/testsuite/synth/issue2222/testsuite.sh
new file mode 100755
index 000000000..08ebf93a4
--- /dev/null
+++ b/testsuite/synth/issue2222/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_only ent
+
+echo "Test successful"