diff options
author | Tristan Gingold | 2013-12-29 18:55:34 +0100 |
---|---|---|
committer | Tristan Gingold | 2013-12-29 18:55:34 +0100 |
commit | 5f8c9462de0347b816cb015ff31772d3e06e9cf2 (patch) | |
tree | dc890b0f78d03b92ff03f455f8b199c82dc11d29 /testsuite/gna/sr2655 | |
parent | 3c7ce7119cc82e72736c2690e0705462c8576779 (diff) | |
download | ghdl-5f8c9462de0347b816cb015ff31772d3e06e9cf2.tar.gz ghdl-5f8c9462de0347b816cb015ff31772d3e06e9cf2.tar.bz2 ghdl-5f8c9462de0347b816cb015ff31772d3e06e9cf2.zip |
Fix bug17127: extend the life of Alloc_Stack variables.
Diffstat (limited to 'testsuite/gna/sr2655')
-rw-r--r-- | testsuite/gna/sr2655/bug.vhdl | 29 | ||||
-rwxr-xr-x | testsuite/gna/sr2655/testsuite.sh | 10 |
2 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/gna/sr2655/bug.vhdl b/testsuite/gna/sr2655/bug.vhdl new file mode 100644 index 0000000..682ece5 --- /dev/null +++ b/testsuite/gna/sr2655/bug.vhdl @@ -0,0 +1,29 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity bug is +end; + +architecture this of bug is + function f return integer is + constant v: std_logic_vector := std_logic_vector'("01HLZX-U"); + begin + assert false report "case 2 starts" severity note; + for i in v'range loop + assert false report "case 2: "&integer'image(i) severity note; + end loop; + return 0; + end; +begin + process + constant v: std_logic_vector := std_logic_vector'("01HLZX-U"); + variable a: integer; + begin + assert false report "case 1 starts" severity note; + for i in v'range loop + assert false report "case 1: "&integer'image(i) severity note; + end loop; + a := f; + wait; + end process; +end; diff --git a/testsuite/gna/sr2655/testsuite.sh b/testsuite/gna/sr2655/testsuite.sh new file mode 100755 index 0000000..8fe9a94 --- /dev/null +++ b/testsuite/gna/sr2655/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze bug.vhdl +elab_simulate bug + +clean + +echo "Test successful" |