From 5e4967dda119ded532aca66be33cf5f8977d43b5 Mon Sep 17 00:00:00 2001 From: Tristan Gingold <tgingold@free.fr> Date: Sat, 25 Nov 2017 07:10:52 +0100 Subject: Add a test about impure functions. --- testsuite/gna/bug080/impurefunc.vhdl | 11 +++++++++++ testsuite/gna/bug080/testsuite.sh | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 testsuite/gna/bug080/impurefunc.vhdl create mode 100755 testsuite/gna/bug080/testsuite.sh 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" -- cgit v1.2.3