aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue2285
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-26 10:24:52 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-26 10:25:22 +0100
commita3a466e54ce31daf8204a31f031cca6ead2d6948 (patch)
treec9a593218582216e6127417cf1e9d24dd4b18afa /testsuite/synth/issue2285
parent9dfc223c388915dd7bff3329b521b98d1ba081f5 (diff)
downloadghdl-a3a466e54ce31daf8204a31f031cca6ead2d6948.tar.gz
ghdl-a3a466e54ce31daf8204a31f031cca6ead2d6948.tar.bz2
ghdl-a3a466e54ce31daf8204a31f031cca6ead2d6948.zip
testsuite/synth: add a test for #2285
Diffstat (limited to 'testsuite/synth/issue2285')
-rw-r--r--testsuite/synth/issue2285/test_to_x01z.vhdl18
-rwxr-xr-xtestsuite/synth/issue2285/testsuite.sh7
2 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/synth/issue2285/test_to_x01z.vhdl b/testsuite/synth/issue2285/test_to_x01z.vhdl
new file mode 100644
index 000000000..4dbefb1e2
--- /dev/null
+++ b/testsuite/synth/issue2285/test_to_x01z.vhdl
@@ -0,0 +1,18 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity test_to_x01z is
+ port (
+ i_a : in std_logic;
+ i_b : in std_logic;
+ o_x : out std_logic
+ );
+end;
+
+architecture rtl of test_to_x01z is
+ signal a, b : std_logic;
+begin
+ a <= To_X01Z(i_a);
+ b <= To_X01Z(i_b);
+ o_x <= a and b;
+end;
diff --git a/testsuite/synth/issue2285/testsuite.sh b/testsuite/synth/issue2285/testsuite.sh
new file mode 100755
index 000000000..f695c2966
--- /dev/null
+++ b/testsuite/synth/issue2285/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_only test_to_x01z
+
+echo "Test successful"