aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-26 17:25:18 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-26 17:25:18 +0200
commitf73b474036e2b91370de0696a14c2faf0a106097 (patch)
treeb9c69ffbd860f005dc813e5f37551905dc8106a5
parentce82d209d582ab6964df9abe5af103ba34c52c0b (diff)
downloadghdl-f73b474036e2b91370de0696a14c2faf0a106097.tar.gz
ghdl-f73b474036e2b91370de0696a14c2faf0a106097.tar.bz2
ghdl-f73b474036e2b91370de0696a14c2faf0a106097.zip
testsuite/synth: test more shifts for #1264
-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"