aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/synth/issue1264/issue2.vhdl20
-rwxr-xr-xtestsuite/synth/issue1264/testsuite.sh1
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/synth/issue1264/issue2.vhdl b/testsuite/synth/issue1264/issue2.vhdl
new file mode 100644
index 000000000..b463410fd
--- /dev/null
+++ b/testsuite/synth/issue1264/issue2.vhdl
@@ -0,0 +1,20 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity issue2 is
+ port (uns_inp : in unsigned (4-1 downto 0);
+ uns_sll : out unsigned (8-1 downto 0);
+ uns_srl : out unsigned (8-1 downto 0);
+ sgn_inp : in signed (4-1 downto 0);
+ sgn_sll : out signed (8-1 downto 0);
+ sgn_srl : out signed (8-1 downto 0));
+end issue2;
+
+architecture beh of issue2 is
+begin
+ uns_sll <= resize (uns_inp, sgn_srl'length) sll 1; -- work
+ uns_srl <= resize (uns_inp, sgn_srl'length) srl 1; -- work
+ sgn_sll <= resize (sgn_inp, sgn_srl'length) sll 1; -- error
+ sgn_srl <= resize (sgn_inp, sgn_srl'length) srl 1; -- error
+end architecture beh;
diff --git a/testsuite/synth/issue1264/testsuite.sh b/testsuite/synth/issue1264/testsuite.sh
index f254e61b0..66f0eff94 100755
--- a/testsuite/synth/issue1264/testsuite.sh
+++ b/testsuite/synth/issue1264/testsuite.sh
@@ -8,6 +8,7 @@ clean
synth_analyze issue
synth_analyze repro
+synth_analyze issue2
clean
echo "Test successful"