diff options
-rw-r--r-- | testsuite/gna/ticket70/bug.vhdl | 26 | ||||
-rwxr-xr-x | testsuite/gna/ticket70/testsuite.sh | 9 |
2 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/gna/ticket70/bug.vhdl b/testsuite/gna/ticket70/bug.vhdl new file mode 100644 index 0000000..eb6d24f --- /dev/null +++ b/testsuite/gna/ticket70/bug.vhdl @@ -0,0 +1,26 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity ent is +end entity; + +architecture a of ent is +begin + main : process + procedure proc(constant value : unsigned) is + variable a : integer := value'length; + variable b : integer := (value'length - 1)/2; + begin + report "x = " & integer'image(a); + report "(x-1)/2 = " & integer'image(b); + assert a = 0 and b = 0 severity failure; + end procedure; + + variable value : unsigned(0 downto 1); + begin + proc(unsigned'("")); + proc(value); + wait; + end process; +end architecture; diff --git a/testsuite/gna/ticket70/testsuite.sh b/testsuite/gna/ticket70/testsuite.sh new file mode 100755 index 0000000..0440719 --- /dev/null +++ b/testsuite/gna/ticket70/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze bug.vhdl +elab_simulate ent +clean + +echo "Test successful" |