aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug054/gen1.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2016-09-10 06:43:02 +0100
committerTristan Gingold <tgingold@free.fr>2016-09-12 20:28:23 +0200
commit14396514c4822239dfdd18dd42d43c75ec9c60ae (patch)
tree98fb3803ab3a5cb3b20d33dcc73e1c51d1c9706f /testsuite/gna/bug054/gen1.vhdl
parent1fd4397098c1bb94c1ce6c2081fa138518dca61f (diff)
downloadghdl-14396514c4822239dfdd18dd42d43c75ec9c60ae.tar.gz
ghdl-14396514c4822239dfdd18dd42d43c75ec9c60ae.tar.bz2
ghdl-14396514c4822239dfdd18dd42d43c75ec9c60ae.zip
Add testcase for generic packages.
Diffstat (limited to 'testsuite/gna/bug054/gen1.vhdl')
-rw-r--r--testsuite/gna/bug054/gen1.vhdl26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/bug054/gen1.vhdl b/testsuite/gna/bug054/gen1.vhdl
new file mode 100644
index 000000000..049763691
--- /dev/null
+++ b/testsuite/gna/bug054/gen1.vhdl
@@ -0,0 +1,26 @@
+package gen1 is
+ generic (v : natural);
+
+ function get return natural;
+end gen1;
+
+package body gen1 is
+ function get return natural is
+ begin
+ return v;
+ end get;
+end gen1;
+
+package gen2 is
+ generic (package pkg is new work.gen1 generic map (<>));
+
+ function get2 return natural;
+end gen2;
+
+package body gen2 is
+
+ function get2 return natural is
+ begin
+ return pkg.get;
+ end get2;
+end gen2;