aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug058/tb1.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/bug058/tb1.vhdl')
-rw-r--r--testsuite/gna/bug058/tb1.vhdl21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/gna/bug058/tb1.vhdl b/testsuite/gna/bug058/tb1.vhdl
new file mode 100644
index 000000000..1e183bec2
--- /dev/null
+++ b/testsuite/gna/bug058/tb1.vhdl
@@ -0,0 +1,21 @@
+package pkg1 is
+ generic (type t; c : t);
+ generic map (t => natural, c => 5);
+
+ function f return t;
+end pkg1;
+
+package body pkg1 is
+ function f return t is
+ begin
+ return c;
+ end f;
+end pkg1;
+
+entity tb is
+end tb;
+
+architecture behav of tb is
+begin
+ assert work.pkg1.f = 5;
+end behav;