aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-11-08 19:06:30 +0100
committerTristan Gingold <tgingold@free.fr>2022-11-08 19:08:30 +0100
commit74bfad1028994077f4630d50c4894d9d2ddc21fb (patch)
treeb513589300fe63ef38487ff8cbab1fc70236ffab /testsuite
parentd13ca642d7bf236b5fe561e9fa559c5c9463170b (diff)
downloadghdl-74bfad1028994077f4630d50c4894d9d2ddc21fb.tar.gz
ghdl-74bfad1028994077f4630d50c4894d9d2ddc21fb.tar.bz2
ghdl-74bfad1028994077f4630d50c4894d9d2ddc21fb.zip
testsuite/synth: add a test for #2240
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue2240/case_concat.vhdl31
-rwxr-xr-xtestsuite/synth/issue2240/testsuite.sh10
2 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/synth/issue2240/case_concat.vhdl b/testsuite/synth/issue2240/case_concat.vhdl
new file mode 100644
index 000000000..3c7351df5
--- /dev/null
+++ b/testsuite/synth/issue2240/case_concat.vhdl
@@ -0,0 +1,31 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity case_concat is
+end entity;
+
+architecture behaviour of case_concat is
+
+ subtype sel_t is std_logic_vector(1 downto 0);
+ constant S0 : sel_t := '0' & '0';
+ constant S1 : sel_t := '0' & '1';
+ constant S2 : sel_t := '1' & '1';
+ constant S3 : sel_t := '1' & '0';
+
+ signal sel : sel_t;
+
+begin
+
+ process (sel)
+ begin
+ case sel is
+ when S0 => null;
+ when S1 => null;
+ when S2 => null;
+ when S3 => null;
+ when others => null;
+ end case;
+ end process;
+
+end architecture;
+
diff --git a/testsuite/synth/issue2240/testsuite.sh b/testsuite/synth/issue2240/testsuite.sh
new file mode 100755
index 000000000..f04cb816a
--- /dev/null
+++ b/testsuite/synth/issue2240/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_only case_concat
+
+GHDL_STD_FLAGS=--std=08
+synth_only case_concat
+
+echo "Test successful"