diff options
author | Tristan Gingold | 2015-05-19 05:49:37 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-05-19 05:49:37 +0200 |
commit | ba52970ab95b84f5495f5c6e389f7bd503eec392 (patch) | |
tree | 0a69cbe987f41a32206a561cf6131be854b6e417 /testsuite/gna/ticket70/bug.vhdl | |
parent | 94c26e359a1f4b10ce09e0a103fff61211c033ab (diff) | |
download | ghdl-ba52970ab95b84f5495f5c6e389f7bd503eec392.tar.gz ghdl-ba52970ab95b84f5495f5c6e389f7bd503eec392.tar.bz2 ghdl-ba52970ab95b84f5495f5c6e389f7bd503eec392.zip |
Testcase for ticket 70.
Diffstat (limited to 'testsuite/gna/ticket70/bug.vhdl')
-rw-r--r-- | testsuite/gna/ticket70/bug.vhdl | 26 |
1 files changed, 26 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; |