diff options
author | Tristan Gingold | 2015-09-10 20:24:33 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-09-10 20:24:33 +0200 |
commit | a67ae38eeedd5d0ca5a75b8174aed201e5c801ad (patch) | |
tree | 9e24b723ab5c8d0d46041433bb3154ffed4527b4 /testsuite/gna/bug019/repro.vhdl | |
parent | 0e257fe7341a44f097ea282c0cbabda42f4ecc41 (diff) | |
download | ghdl-a67ae38eeedd5d0ca5a75b8174aed201e5c801ad.tar.gz ghdl-a67ae38eeedd5d0ca5a75b8174aed201e5c801ad.tar.bz2 ghdl-a67ae38eeedd5d0ca5a75b8174aed201e5c801ad.zip |
Add bug019 testcase.
Diffstat (limited to 'testsuite/gna/bug019/repro.vhdl')
-rw-r--r-- | testsuite/gna/bug019/repro.vhdl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/gna/bug019/repro.vhdl b/testsuite/gna/bug019/repro.vhdl new file mode 100644 index 0000000..6005bd5 --- /dev/null +++ b/testsuite/gna/bug019/repro.vhdl @@ -0,0 +1,43 @@ +entity repro is +end repro ; + +architecture arch of repro is + function get_str (l : natural) return string is + variable res : string (1 to l); + begin + for i in res'range loop + res (i) := character'val (96 + i); + end loop; + return res; + end get_str; + + procedure check2 (msg : string) is + begin + report msg; + assert msg (1 to 10) = "abcdefghij" severity failure; + end check2; + + procedure check1 (msg : string) is + begin + report "before check"; + wait for 1 ns; + check2 (msg); + report "after check"; + wait for 1 ns; + end check1; +begin + process + begin + check1 (get_str (24)); + wait; + end process; + + process + begin + for i in 10 to 20 loop + report get_str (i); + wait for 1 ns; + end loop; + wait; + end process; +end arch; |