diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-12-05 03:22:50 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-12-05 03:25:22 +0100 |
commit | 8c6e74a5dea5324e72b12482b35e92d278c9bffa (patch) | |
tree | 48474ae4808c07334b8a2e8959ce4701374128d9 /testsuite/gna/bug058/tb2.vhdl | |
parent | 0f94031b6843794dfdd7e1c0a1b72235908cecd9 (diff) | |
download | ghdl-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.vhdl | 20 |
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; |