aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue99/bug1.vhdl10
-rw-r--r--testsuite/gna/issue99/bug2.vhdl8
-rw-r--r--testsuite/gna/issue99/repro.vhdl6
-rw-r--r--testsuite/gna/issue99/repro1.vhdl9
-rw-r--r--testsuite/gna/issue99/test.vhdl9
-rwxr-xr-xtestsuite/gna/issue99/testsuite.sh12
6 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/gna/issue99/bug1.vhdl b/testsuite/gna/issue99/bug1.vhdl
new file mode 100644
index 000000000..b8a2aba5e
--- /dev/null
+++ b/testsuite/gna/issue99/bug1.vhdl
@@ -0,0 +1,10 @@
+package bug1 is
+ generic ( gen: natural );
+ constant test: natural:=gen;
+end package;
+
+package mygbug1 is new work.bug1 generic map ( gen => 17 );
+
+package body bug1 is
+end ;
+
diff --git a/testsuite/gna/issue99/bug2.vhdl b/testsuite/gna/issue99/bug2.vhdl
new file mode 100644
index 000000000..a86f4127f
--- /dev/null
+++ b/testsuite/gna/issue99/bug2.vhdl
@@ -0,0 +1,8 @@
+package bug2 is
+ generic ( gen: natural );
+ constant test: natural:=gen;
+
+ function get_val return natural;
+end package;
+
+package mygbug2 is new work.bug2 generic map ( gen => 17 );
diff --git a/testsuite/gna/issue99/repro.vhdl b/testsuite/gna/issue99/repro.vhdl
new file mode 100644
index 000000000..ea8d3e891
--- /dev/null
+++ b/testsuite/gna/issue99/repro.vhdl
@@ -0,0 +1,6 @@
+package pkg is
+ generic ( gen: natural );
+ constant test: natural:=gen;
+end package;
+
+package mygpkg is new work.pkg generic map ( gen => 17 );
diff --git a/testsuite/gna/issue99/repro1.vhdl b/testsuite/gna/issue99/repro1.vhdl
new file mode 100644
index 000000000..055f8b7d3
--- /dev/null
+++ b/testsuite/gna/issue99/repro1.vhdl
@@ -0,0 +1,9 @@
+package pkg is
+ generic ( gen: natural );
+ constant test: natural:=gen;
+end package;
+
+package body pkg is
+end pkg;
+
+package mygpkg is new work.pkg generic map ( gen => 17 );
diff --git a/testsuite/gna/issue99/test.vhdl b/testsuite/gna/issue99/test.vhdl
new file mode 100644
index 000000000..9a1d291d8
--- /dev/null
+++ b/testsuite/gna/issue99/test.vhdl
@@ -0,0 +1,9 @@
+entity test is
+end;
+
+use work.pkg;
+use work.mygpkg;
+architecture behav of test is
+begin
+ assert mygpkg.test = 17;
+end behav;
diff --git a/testsuite/gna/issue99/testsuite.sh b/testsuite/gna/issue99/testsuite.sh
new file mode 100755
index 000000000..6fb5a7c69
--- /dev/null
+++ b/testsuite/gna/issue99/testsuite.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+analyze repro.vhdl
+analyze test.vhdl
+elab_simulate test
+
+clean
+
+echo "Test successful"