diff options
-rw-r--r-- | testsuite/gna/issue205/repro1.vhdl | 33 | ||||
-rwxr-xr-x | testsuite/gna/issue205/testsuite.sh | 3 |
2 files changed, 35 insertions, 1 deletions
diff --git a/testsuite/gna/issue205/repro1.vhdl b/testsuite/gna/issue205/repro1.vhdl new file mode 100644 index 000000000..79ccfd54f --- /dev/null +++ b/testsuite/gna/issue205/repro1.vhdl @@ -0,0 +1,33 @@ +package SortListGenericPkg is + generic ( + type ElementType; + function "<"(L : ElementType; R : ElementType) return boolean; + function "<="(L : ElementType; R : ElementType) return boolean + ); + function f (a, b : ElementType) return boolean; +end package; + +package body SortListGenericPkg is + function f (a, b : ElementType) return boolean is + begin + return a <= b; + end f; +end; + +package mysort is new work.SortListGenericPkg generic map (natural, "<", "<="); + +entity repro is +end repro; + +use work.mysort.all; +architecture behav of repro +is +begin + process + variable ok : boolean; + begin + ok := f (3, 12); + assert ok report "bad comparaison" severity failure; + wait; + end process; +end behav; diff --git a/testsuite/gna/issue205/testsuite.sh b/testsuite/gna/issue205/testsuite.sh index 7b37332aa..eefe1e0b3 100755 --- a/testsuite/gna/issue205/testsuite.sh +++ b/testsuite/gna/issue205/testsuite.sh @@ -3,7 +3,8 @@ . ../../testenv.sh export GHDL_STD_FLAGS=--std=08 -analyze repro.vhdl +analyze repro1.vhdl +elab_simulate repro clean |