diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-16 05:02:42 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-16 05:02:42 +0200 |
commit | 5efe92abd49565576c91a941e6aa1036a2c5da8a (patch) | |
tree | b2e90894886e8790aa8be4bc660c96941e516e53 /testsuite/gna/issue439 | |
parent | cb252f101703335438c6019b953c6d40e53be95b (diff) | |
download | ghdl-5efe92abd49565576c91a941e6aa1036a2c5da8a.tar.gz ghdl-5efe92abd49565576c91a941e6aa1036a2c5da8a.tar.bz2 ghdl-5efe92abd49565576c91a941e6aa1036a2c5da8a.zip |
Add reproducer for #439
Diffstat (limited to 'testsuite/gna/issue439')
-rw-r--r-- | testsuite/gna/issue439/e.vhdl | 22 | ||||
-rwxr-xr-x | testsuite/gna/issue439/testsuite.sh | 11 |
2 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/gna/issue439/e.vhdl b/testsuite/gna/issue439/e.vhdl new file mode 100644 index 000000000..0b057da01 --- /dev/null +++ b/testsuite/gna/issue439/e.vhdl @@ -0,0 +1,22 @@ +package p is + generic( + function generic_f(b:bit) return boolean; + function generic_f(b:boolean) return bit + ); + function f(b:bit ) return boolean; + function f(b:boolean) return bit ; +end package; + +package body p is + function f(b:bit ) return boolean is begin return generic_f(b); end function; + function f(b:boolean) return bit is begin return generic_f(b); end function; +end package body; + +entity e is end entity; +architecture a of e is + function f(b:bit ) return boolean is begin return false; end function; + function f(b:boolean) return bit is begin return '0' ; end function; + package q is new work.p generic map(f,f); +begin + assert q.f('0') report "msg2" severity note; +end architecture; diff --git a/testsuite/gna/issue439/testsuite.sh b/testsuite/gna/issue439/testsuite.sh new file mode 100755 index 000000000..1a4b10413 --- /dev/null +++ b/testsuite/gna/issue439/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze e.vhdl +elab_simulate e + +clean + +echo "Test successful" |