aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-15 03:29:57 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-15 03:29:57 +0200
commit1202fd28203f424a0a7431a289f244ed2d98557f (patch)
treeab124742898f03866163717a270af95336bfed7f /testsuite/gna
parent0557b7d15c6f44720e7122bf480e67f1e168f13f (diff)
downloadghdl-1202fd28203f424a0a7431a289f244ed2d98557f.tar.gz
ghdl-1202fd28203f424a0a7431a289f244ed2d98557f.tar.bz2
ghdl-1202fd28203f424a0a7431a289f244ed2d98557f.zip
Add testcase for issue in vhdl 08
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/bug059/tb.vhdl12
-rw-r--r--testsuite/gna/bug059/tb1.vhdl13
-rwxr-xr-xtestsuite/gna/bug059/testsuite.sh16
3 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/gna/bug059/tb.vhdl b/testsuite/gna/bug059/tb.vhdl
new file mode 100644
index 000000000..0bf3ec7b0
--- /dev/null
+++ b/testsuite/gna/bug059/tb.vhdl
@@ -0,0 +1,12 @@
+entity tb is
+end;
+
+architecture behav of tb is
+begin
+ b : block
+ generic (c : natural);
+ generic map (c => c);
+ begin
+ assert true;
+ end block b;
+end behav;
diff --git a/testsuite/gna/bug059/tb1.vhdl b/testsuite/gna/bug059/tb1.vhdl
new file mode 100644
index 000000000..c41f7837e
--- /dev/null
+++ b/testsuite/gna/bug059/tb1.vhdl
@@ -0,0 +1,13 @@
+package pkg1 is
+ generic (c : natural);
+ -- ??? Looks invalid, but what is the rule ?
+ generic map (c => c);
+end pkg1;
+
+entity tb1 is
+end;
+
+architecture behav of tb1 is
+begin
+ assert true;
+end behav;
diff --git a/testsuite/gna/bug059/testsuite.sh b/testsuite/gna/bug059/testsuite.sh
new file mode 100755
index 000000000..4bb875303
--- /dev/null
+++ b/testsuite/gna/bug059/testsuite.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure tb.vhdl
+
+clean
+
+GHDL_STD_FLAGS=--std=08
+
+# This should fail
+analyze tb1.vhdl
+
+clean
+
+echo "Test successful"