From 5e6b4c599933724be5a88d468502ae2d963e5ada Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 29 Jan 2023 08:47:32 +0100 Subject: testsuite/synth: add a test for #2330 --- testsuite/synth/issue2330/repro.vhdl | 13 +++++++++++++ testsuite/synth/issue2330/testsuite.sh | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 testsuite/synth/issue2330/repro.vhdl create mode 100755 testsuite/synth/issue2330/testsuite.sh 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" -- cgit v1.2.3