From da2efff4d82663041c133485eac5c1dcd83c3d43 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 4 Jul 2022 21:12:17 +0200 Subject: testsuite/synth: add a test for #2123 --- testsuite/synth/issue2123/bug.vhdl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 testsuite/synth/issue2123/bug.vhdl (limited to 'testsuite/synth/issue2123/bug.vhdl') diff --git a/testsuite/synth/issue2123/bug.vhdl b/testsuite/synth/issue2123/bug.vhdl new file mode 100644 index 000000000..d20de9214 --- /dev/null +++ b/testsuite/synth/issue2123/bug.vhdl @@ -0,0 +1,16 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +entity bug is + port ( + a : in unsigned(8-1 downto 0); + b : in unsigned(8-1 downto 0); + d : out signed(8 downto 0) + ); +end bug; + +architecture behav of bug is +begin + d <= (abs(signed('0' & a) - signed('0' & b))); +end behav; -- cgit v1.2.3