aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue439
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue439')
-rw-r--r--testsuite/gna/issue439/e.vhdl22
-rwxr-xr-xtestsuite/gna/issue439/testsuite.sh11
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"