diff options
-rw-r--r-- | testsuite/gna/issue199/repro.vhdl | 30 | ||||
-rwxr-xr-x | testsuite/gna/issue199/testsuite.sh | 11 |
2 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/gna/issue199/repro.vhdl b/testsuite/gna/issue199/repro.vhdl new file mode 100644 index 000000000..cc688af52 --- /dev/null +++ b/testsuite/gna/issue199/repro.vhdl @@ -0,0 +1,30 @@ +ENTITY repro IS +END repro; + +package genpkg is + generic (function match (l, R : integer) return boolean); + procedure comp (l, R : integer; res : out boolean); +end genpkg; + +package body genpkg is + procedure comp (l, R : integer; res : out boolean) is + begin + res := match (l, r); + end comp; +end genpkg; + +package my_pkg is new work.genpkg generic map (match => "="); + +use work.my_pkg.all; + +ARCHITECTURE behav OF repro IS +BEGIN + PROCESS + variable ok : boolean; + BEGIN + comp (5, 2 + 3, ok); + --ok := my_pkg.comp (5, 2 + 3); + assert ok severity error; + wait; + END PROCESS; +end behav; diff --git a/testsuite/gna/issue199/testsuite.sh b/testsuite/gna/issue199/testsuite.sh new file mode 100755 index 000000000..8d22a2073 --- /dev/null +++ b/testsuite/gna/issue199/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze repro.vhdl +elab_simulate repro + +clean + +echo "Test successful" |