aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/bug054/gen1.vhdl26
-rw-r--r--testsuite/gna/bug054/gen2.vhdl38
-rw-r--r--testsuite/gna/bug054/gen3.vhdl38
-rw-r--r--testsuite/gna/bug054/gen4.vhdl38
-rwxr-xr-xtestsuite/gna/bug054/testsuite.sh14
-rw-r--r--testsuite/gna/bug055/gen1-body.vhdl6
-rw-r--r--testsuite/gna/bug055/gen1.vhdl5
-rw-r--r--testsuite/gna/bug055/gen2-body.vhdl8
-rw-r--r--testsuite/gna/bug055/gen2.vhdl5
-rw-r--r--testsuite/gna/bug055/pkg1.vhdl1
-rw-r--r--testsuite/gna/bug055/pkg2.vhdl1
-rw-r--r--testsuite/gna/bug055/tb-behav.vhdl4
-rw-r--r--testsuite/gna/bug055/tb.vhdl2
-rwxr-xr-xtestsuite/gna/bug055/testsuite.sh16
14 files changed, 202 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;
diff --git a/testsuite/gna/bug054/gen2.vhdl b/testsuite/gna/bug054/gen2.vhdl
new file mode 100644
index 000000000..a9543aaae
--- /dev/null
+++ b/testsuite/gna/bug054/gen2.vhdl
@@ -0,0 +1,38 @@
+package gen1 is
+ generic (v : natural := 5);
+
+ 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
+ use pkg.all;
+
+ function get2 return natural is
+ begin
+ return get;
+ end get2;
+end gen2;
+
+package pkg1 is new work.gen1;
+package pkg2 is new work.gen2 generic map (work.pkg1);
+
+entity tb is
+end tb;
+
+architecture behav of tb is
+begin
+ assert work.pkg2.get2 = 5;
+end behav;
diff --git a/testsuite/gna/bug054/gen3.vhdl b/testsuite/gna/bug054/gen3.vhdl
new file mode 100644
index 000000000..ca4109d84
--- /dev/null
+++ b/testsuite/gna/bug054/gen3.vhdl
@@ -0,0 +1,38 @@
+package gen1 is
+ generic (v : natural := 5);
+
+ 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
+ use pkg.all;
+
+ function get2 return natural is
+ begin
+ return get;
+ end get2;
+end gen2;
+
+package pkg1 is new work.gen1;
+package pkg2 is new work.gen2 generic map (pkg1);
+
+entity tb is
+end tb;
+
+architecture behav of tb is
+begin
+ assert work.pkg2.get2 = 5;
+end behav;
diff --git a/testsuite/gna/bug054/gen4.vhdl b/testsuite/gna/bug054/gen4.vhdl
new file mode 100644
index 000000000..a9543aaae
--- /dev/null
+++ b/testsuite/gna/bug054/gen4.vhdl
@@ -0,0 +1,38 @@
+package gen1 is
+ generic (v : natural := 5);
+
+ 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
+ use pkg.all;
+
+ function get2 return natural is
+ begin
+ return get;
+ end get2;
+end gen2;
+
+package pkg1 is new work.gen1;
+package pkg2 is new work.gen2 generic map (work.pkg1);
+
+entity tb is
+end tb;
+
+architecture behav of tb is
+begin
+ assert work.pkg2.get2 = 5;
+end behav;
diff --git a/testsuite/gna/bug054/testsuite.sh b/testsuite/gna/bug054/testsuite.sh
new file mode 100755
index 000000000..d8200ef1c
--- /dev/null
+++ b/testsuite/gna/bug054/testsuite.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+analyze gen1.vhdl
+analyze gen2.vhdl
+analyze_failure gen3.vhdl
+analyze gen4.vhdl
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/bug055/gen1-body.vhdl b/testsuite/gna/bug055/gen1-body.vhdl
new file mode 100644
index 000000000..ee0c8e962
--- /dev/null
+++ b/testsuite/gna/bug055/gen1-body.vhdl
@@ -0,0 +1,6 @@
+package body gen1 is
+ function get return natural is
+ begin
+ return v;
+ end get;
+end gen1;
diff --git a/testsuite/gna/bug055/gen1.vhdl b/testsuite/gna/bug055/gen1.vhdl
new file mode 100644
index 000000000..5d7062ab3
--- /dev/null
+++ b/testsuite/gna/bug055/gen1.vhdl
@@ -0,0 +1,5 @@
+package gen1 is
+ generic (v : natural := 5);
+
+ function get return natural;
+end gen1;
diff --git a/testsuite/gna/bug055/gen2-body.vhdl b/testsuite/gna/bug055/gen2-body.vhdl
new file mode 100644
index 000000000..372a71645
--- /dev/null
+++ b/testsuite/gna/bug055/gen2-body.vhdl
@@ -0,0 +1,8 @@
+package body gen2 is
+ use pkg.all;
+
+ function get2 return natural is
+ begin
+ return get;
+ end get2;
+end gen2;
diff --git a/testsuite/gna/bug055/gen2.vhdl b/testsuite/gna/bug055/gen2.vhdl
new file mode 100644
index 000000000..e7c7efe1a
--- /dev/null
+++ b/testsuite/gna/bug055/gen2.vhdl
@@ -0,0 +1,5 @@
+package gen2 is
+ generic (package pkg is new work.gen1 generic map (<>));
+
+ function get2 return natural;
+end gen2;
diff --git a/testsuite/gna/bug055/pkg1.vhdl b/testsuite/gna/bug055/pkg1.vhdl
new file mode 100644
index 000000000..3219ee3f0
--- /dev/null
+++ b/testsuite/gna/bug055/pkg1.vhdl
@@ -0,0 +1 @@
+package pkg1 is new work.gen1;
diff --git a/testsuite/gna/bug055/pkg2.vhdl b/testsuite/gna/bug055/pkg2.vhdl
new file mode 100644
index 000000000..c466485da
--- /dev/null
+++ b/testsuite/gna/bug055/pkg2.vhdl
@@ -0,0 +1 @@
+package pkg2 is new work.gen2 generic map (work.pkg1);
diff --git a/testsuite/gna/bug055/tb-behav.vhdl b/testsuite/gna/bug055/tb-behav.vhdl
new file mode 100644
index 000000000..86c4f247c
--- /dev/null
+++ b/testsuite/gna/bug055/tb-behav.vhdl
@@ -0,0 +1,4 @@
+architecture behav of tb is
+begin
+ assert work.pkg2.get2 = 5;
+end behav;
diff --git a/testsuite/gna/bug055/tb.vhdl b/testsuite/gna/bug055/tb.vhdl
new file mode 100644
index 000000000..2aed1a994
--- /dev/null
+++ b/testsuite/gna/bug055/tb.vhdl
@@ -0,0 +1,2 @@
+entity tb is
+end tb;
diff --git a/testsuite/gna/bug055/testsuite.sh b/testsuite/gna/bug055/testsuite.sh
new file mode 100755
index 000000000..c80cb0d7d
--- /dev/null
+++ b/testsuite/gna/bug055/testsuite.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+analyze gen1.vhdl
+analyze gen2.vhdl
+analyze_failure pkg1.vhdl
+
+analyze gen1-body.vhdl
+analyze pkg1.vhdl
+
+clean
+
+echo "Test successful"