diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-29 08:47:32 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-29 08:47:32 +0100 |
commit | 5e6b4c599933724be5a88d468502ae2d963e5ada (patch) | |
tree | 49821e222aa9e2592fcfb147f63e0199137528c1 | |
parent | 3965e755a499824c211965edaeac7c07fc50ccd8 (diff) | |
download | ghdl-5e6b4c599933724be5a88d468502ae2d963e5ada.tar.gz ghdl-5e6b4c599933724be5a88d468502ae2d963e5ada.tar.bz2 ghdl-5e6b4c599933724be5a88d468502ae2d963e5ada.zip |
testsuite/synth: add a test for #2330
-rw-r--r-- | testsuite/synth/issue2330/repro.vhdl | 13 | ||||
-rwxr-xr-x | testsuite/synth/issue2330/testsuite.sh | 7 |
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" |