aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-06-28 05:46:28 +0200
committerTristan Gingold <tgingold@free.fr>2016-06-28 05:47:52 +0200
commit9d38f14e5180a4b30c4dbb11ecbf954b3473bce9 (patch)
tree48ec3ffbbbc7e0d722ca689018090701a171cfa7 /testsuite/gna
parentc3bfe727639a450270e3e3a69e513b20fc40682f (diff)
downloadghdl-9d38f14e5180a4b30c4dbb11ecbf954b3473bce9.tar.gz
ghdl-9d38f14e5180a4b30c4dbb11ecbf954b3473bce9.tar.bz2
ghdl-9d38f14e5180a4b30c4dbb11ecbf954b3473bce9.zip
Testcase for issue99.
Close #99
Diffstat (limited to 'testsuite/gna')
-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"