diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-06-02 20:27:06 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-06-02 20:27:06 +0200 |
commit | 20259a7f396e03c5bfce9237fd5732eb931e3d23 (patch) | |
tree | f4937b613e940ccc6a5e84a3527110b010615525 | |
parent | 9f3567a554b78b200ea91cb66e5945a80fd0ceb3 (diff) | |
download | ghdl-20259a7f396e03c5bfce9237fd5732eb931e3d23.tar.gz ghdl-20259a7f396e03c5bfce9237fd5732eb931e3d23.tar.bz2 ghdl-20259a7f396e03c5bfce9237fd5732eb931e3d23.zip |
Add testcase for issue67
-rw-r--r-- | testsuite/gna/issue67/fileerr.vhdl | 14 | ||||
-rw-r--r-- | testsuite/gna/issue67/nullacc.vhdl | 18 | ||||
-rwxr-xr-x | testsuite/gna/issue67/testsuite.sh | 13 |
3 files changed, 45 insertions, 0 deletions
diff --git a/testsuite/gna/issue67/fileerr.vhdl b/testsuite/gna/issue67/fileerr.vhdl new file mode 100644 index 000000000..6ec380ece --- /dev/null +++ b/testsuite/gna/issue67/fileerr.vhdl @@ -0,0 +1,14 @@ +entity fileerr is +end fileerr; + +use std.textio.all; + +architecture behav of fileerr is +begin + process + file f : text; + begin + file_open (f, "bad-file-name"); + wait; + end process; +end behav; diff --git a/testsuite/gna/issue67/nullacc.vhdl b/testsuite/gna/issue67/nullacc.vhdl new file mode 100644 index 000000000..31d3328f5 --- /dev/null +++ b/testsuite/gna/issue67/nullacc.vhdl @@ -0,0 +1,18 @@ +entity nullacc is +end nullacc; + +architecture behav of nullacc is +begin + process + type int_acc is access integer; + variable v : int_acc; + begin + v := new integer'(7); + assert v.all = 7 severity failure; + deallocate (v); + assert v.all = 0 severity note; -- access error + wait; + end process; +end behav; + + diff --git a/testsuite/gna/issue67/testsuite.sh b/testsuite/gna/issue67/testsuite.sh new file mode 100755 index 000000000..3ed6c40d7 --- /dev/null +++ b/testsuite/gna/issue67/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze nullacc.vhdl +elab_simulate_failure nullacc + +analyze fileerr.vhdl +elab_simulate_failure fileerr + +clean + +echo "Test successful" |