From d5fcf0c153c4cc0d5f27004ae0c57484581bdcc8 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 8 Aug 2012 22:15:07 -0400 Subject: [PATCH] Test for bug349 --- test_regress/t/t_math_signed.v | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test_regress/t/t_math_signed.v b/test_regress/t/t_math_signed.v index be5b7cfba..2d176c04a 100644 --- a/test_regress/t/t_math_signed.v +++ b/test_regress/t/t_math_signed.v @@ -53,6 +53,11 @@ module t (/*AUTOARG*/ // verilator lint_on WIDTH end + reg signed [32:0] bug349; + + initial + begin + end integer i; initial begin if ((-1 >>> 3) != -1) $stop; // Decimals are signed @@ -81,6 +86,10 @@ module t (/*AUTOARG*/ i = -'sd12 /3; if (i !== 32'hfffffffc) $stop; i = -4'sd12 /3; if (i !== 32'h00000001) $stop; // verilator lint_on WIDTH + + // verilator lint_off WIDTH + bug349 = 4'sb1111 - 1'b1; + if (bug349 != 32'he) $stop; end function signed [15:0] copy_signed;