aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-29 08:47:32 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-29 08:47:32 +0100
commit5e6b4c599933724be5a88d468502ae2d963e5ada (patch)
tree49821e222aa9e2592fcfb147f63e0199137528c1 /testsuite/synth
parent3965e755a499824c211965edaeac7c07fc50ccd8 (diff)
downloadghdl-5e6b4c599933724be5a88d468502ae2d963e5ada.tar.gz
ghdl-5e6b4c599933724be5a88d468502ae2d963e5ada.tar.bz2
ghdl-5e6b4c599933724be5a88d468502ae2d963e5ada.zip
testsuite/synth: add a test for #2330
Diffstat (limited to 'testsuite/synth')
-rw-r--r--testsuite/synth/issue2330/repro.vhdl13
-rwxr-xr-xtestsuite/synth/issue2330/testsuite.sh7
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/synth/issue2330/repro.vhdl b/testsuite/synth/issue2330/repro.vhdl
new file mode 100644
index 000000000..c112b23bc
--- /dev/null
+++ b/testsuite/synth/issue2330/repro.vhdl
@@ -0,0 +1,13 @@
+entity repro is
+ port (a, b : bit_vector(7 downto 0);
+ o : out bit);
+end repro;
+
+architecture arch of repro is
+ function f (a, b : bit_vector(7 downto 0)) return boolean is
+ begin
+ return a = x"ca" and b = x"fe";
+ end f;
+begin
+ o <= '1' when f(a,b) else '0';
+end arch;
diff --git a/testsuite/synth/issue2330/testsuite.sh b/testsuite/synth/issue2330/testsuite.sh
new file mode 100755
index 000000000..e9dc72228
--- /dev/null
+++ b/testsuite/synth/issue2330/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_only repro
+
+echo "Test successful"