aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue529/impure2.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue529/impure2.vhdl')
-rw-r--r--testsuite/gna/issue529/impure2.vhdl27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue529/impure2.vhdl b/testsuite/gna/issue529/impure2.vhdl
new file mode 100644
index 000000000..83f37ccc0
--- /dev/null
+++ b/testsuite/gna/issue529/impure2.vhdl
@@ -0,0 +1,27 @@
+entity impure_ex2 is
+port (
+ clk : in bit;
+ arg : in bit;
+ res : out bit
+);
+end impure_ex2;
+
+architecture rtl of impure_ex2 is
+
+ -- An impure function called from a combinatorial process with "all"
+ -- sensitivity triggers an exception.
+ impure function foo return bit is
+ begin
+ return arg;
+ end function foo;
+
+ signal ns : bit;
+
+begin
+
+ --comb_process : process(res) -- this works
+ comb_process : process(all)
+ begin
+ ns <= res XOR foo;
+ end process;
+end rtl;