aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1679
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-03-13 08:17:36 +0100
committerTristan Gingold <tgingold@free.fr>2021-03-13 08:17:36 +0100
commit691be6df9c319c03e0b960bb3d7233b1892228ce (patch)
treeef8392455730178cd5090667fe4e164f1afc7034 /testsuite/synth/issue1679
parentee3a04b7dbfc796057a2ac0c8c1ae07744cc175d (diff)
downloadghdl-691be6df9c319c03e0b960bb3d7233b1892228ce.tar.gz
ghdl-691be6df9c319c03e0b960bb3d7233b1892228ce.tar.bz2
ghdl-691be6df9c319c03e0b960bb3d7233b1892228ce.zip
testsuite/synth: add a test for #1679
Diffstat (limited to 'testsuite/synth/issue1679')
-rw-r--r--testsuite/synth/issue1679/test_fail.vhdl23
-rwxr-xr-xtestsuite/synth/issue1679/testsuite.sh7
2 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/synth/issue1679/test_fail.vhdl b/testsuite/synth/issue1679/test_fail.vhdl
new file mode 100644
index 000000000..1b6cbf520
--- /dev/null
+++ b/testsuite/synth/issue1679/test_fail.vhdl
@@ -0,0 +1,23 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity test_fail is
+ port(
+ value_i: in std_ulogic_vector(7 downto 0);
+ matches_o: out std_ulogic
+ );
+end entity;
+
+architecture beh of test_fail is
+
+ subtype data_t is std_ulogic_vector(7 downto 0);
+ signal value_s : data_t;
+ constant expected_c : data_t := "10001---";
+
+begin
+
+ value_s <= value_i;
+ matches_o <= '1' when std_match(value_s, expected_c) else '0';
+
+end architecture;
diff --git a/testsuite/synth/issue1679/testsuite.sh b/testsuite/synth/issue1679/testsuite.sh
new file mode 100755
index 000000000..9d823928f
--- /dev/null
+++ b/testsuite/synth/issue1679/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_only test_fail
+
+echo "Test successful"