diff options
-rw-r--r-- | testsuite/gna/issue397/e.vhdl | 26 | ||||
-rwxr-xr-x | testsuite/gna/issue397/testsuite.sh | 10 |
2 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/gna/issue397/e.vhdl b/testsuite/gna/issue397/e.vhdl new file mode 100644 index 000000000..c617150bb --- /dev/null +++ b/testsuite/gna/issue397/e.vhdl @@ -0,0 +1,26 @@ +entity bug is +end entity; + +architecture a of bug is +begin + main : process + type rec_t is record + field : natural; + end record; + + impure function get_rec return rec_t is + begin + return (field => 10); + end; + + -- Comment out this procedure to avoid the crash + procedure get_rec(variable rec : out rec_t) is + begin + rec := get_rec; + end; + + begin + assert get_rec.field = 10 severity failure; + wait; + end process; +end; diff --git a/testsuite/gna/issue397/testsuite.sh b/testsuite/gna/issue397/testsuite.sh new file mode 100755 index 000000000..854e53f9b --- /dev/null +++ b/testsuite/gna/issue397/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze e.vhdl +elab_simulate bug + +clean + +echo "Test successful" |