aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-07-06 08:07:29 +0200
committerTristan Gingold <tgingold@free.fr>2022-07-06 08:07:29 +0200
commit7783d1a1d87a8d8ae9c251d3a0091ff7fc728dd7 (patch)
tree6080da9bbf1c0cf176c7605f1cc5332e2b77017d /testsuite
parent3929ff5f232481b965ab4da4503fc515d577e4c5 (diff)
downloadghdl-7783d1a1d87a8d8ae9c251d3a0091ff7fc728dd7.tar.gz
ghdl-7783d1a1d87a8d8ae9c251d3a0091ff7fc728dd7.tar.bz2
ghdl-7783d1a1d87a8d8ae9c251d3a0091ff7fc728dd7.zip
testsuite/synth: add a test for #2129
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue2129/isx.vhdl23
-rwxr-xr-xtestsuite/synth/issue2129/testsuite.sh9
2 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/synth/issue2129/isx.vhdl b/testsuite/synth/issue2129/isx.vhdl
new file mode 100644
index 000000000..e72f2a8a9
--- /dev/null
+++ b/testsuite/synth/issue2129/isx.vhdl
@@ -0,0 +1,23 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity isx is
+ port (
+ s : in std_ulogic_vector(1 downto 0);
+ u : in signed(1 downto 0)
+ );
+end entity isx;
+
+architecture rtl of isx is
+begin
+ test1 : process(all)
+ begin
+ if is_X(s) then
+ report "std_ulogic test" severity FAILURE;
+ end if;
+ if is_X(u) then
+ report "unsigned test" severity FAILURE;
+ end if;
+ end process;
+end;
diff --git a/testsuite/synth/issue2129/testsuite.sh b/testsuite/synth/issue2129/testsuite.sh
new file mode 100755
index 000000000..a8c21100f
--- /dev/null
+++ b/testsuite/synth/issue2129/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+synth_only isx
+
+echo "Test successful"