diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-11-25 07:10:52 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-11-25 07:10:52 +0100 |
commit | 5e4967dda119ded532aca66be33cf5f8977d43b5 (patch) | |
tree | f8a2517d214f5e668dab3b2f4b8ba613894c491a /testsuite/gna/bug080 | |
parent | 49294a83ee67eef83180721c578f69855bf96cad (diff) | |
download | ghdl-5e4967dda119ded532aca66be33cf5f8977d43b5.tar.gz ghdl-5e4967dda119ded532aca66be33cf5f8977d43b5.tar.bz2 ghdl-5e4967dda119ded532aca66be33cf5f8977d43b5.zip |
Add a test about impure functions.
Diffstat (limited to 'testsuite/gna/bug080')
-rw-r--r-- | testsuite/gna/bug080/impurefunc.vhdl | 11 | ||||
-rwxr-xr-x | testsuite/gna/bug080/testsuite.sh | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/gna/bug080/impurefunc.vhdl b/testsuite/gna/bug080/impurefunc.vhdl new file mode 100644 index 000000000..0b83b96e2 --- /dev/null +++ b/testsuite/gna/bug080/impurefunc.vhdl @@ -0,0 +1,11 @@ +package impurefunc is + signal a: bit; + impure function impure_func return boolean; +end package; +package body impurefunc is + impure function impure_func return boolean is + begin + a <= '1'; + return FALSE; + end function; +end package body; diff --git a/testsuite/gna/bug080/testsuite.sh b/testsuite/gna/bug080/testsuite.sh new file mode 100755 index 000000000..b0ff1b2b8 --- /dev/null +++ b/testsuite/gna/bug080/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure impurefunc.vhdl + +clean + +echo "Test successful" |