aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug058/tb2.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-05 03:22:50 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-05 03:25:22 +0100
commit8c6e74a5dea5324e72b12482b35e92d278c9bffa (patch)
tree48474ae4808c07334b8a2e8959ce4701374128d9 /testsuite/gna/bug058/tb2.vhdl
parent0f94031b6843794dfdd7e1c0a1b72235908cecd9 (diff)
downloadghdl-8c6e74a5dea5324e72b12482b35e92d278c9bffa.tar.gz
ghdl-8c6e74a5dea5324e72b12482b35e92d278c9bffa.tar.bz2
ghdl-8c6e74a5dea5324e72b12482b35e92d278c9bffa.zip
Add testcase for interface function.
Diffstat (limited to 'testsuite/gna/bug058/tb2.vhdl')
-rw-r--r--testsuite/gna/bug058/tb2.vhdl20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/gna/bug058/tb2.vhdl b/testsuite/gna/bug058/tb2.vhdl
new file mode 100644
index 000000000..98f7bc5c1
--- /dev/null
+++ b/testsuite/gna/bug058/tb2.vhdl
@@ -0,0 +1,20 @@
+entity tb2 is
+end tb2;
+
+architecture behav of tb2 is
+ package pkg1 is
+ generic (c : natural);
+ generic map (c => 5);
+
+ function f return natural;
+ end pkg1;
+
+ package body pkg1 is
+ function f return natural is
+ begin
+ return c;
+ end f;
+ end pkg1;
+begin
+ assert pkg1.f = 5 severity failure;
+end behav;