aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-07-11 07:31:14 +0200
committerTristan Gingold <tgingold@free.fr>2015-07-11 07:31:14 +0200
commitd12616d2738c6158654d9058fd788f5ec0306109 (patch)
treef5c0580e83f5325977988c6ed37d0a1640d6904e /testsuite
parent3756de36c89a5d8e3da0820c3de3d63af0e3f57a (diff)
downloadghdl-d12616d2738c6158654d9058fd788f5ec0306109.tar.gz
ghdl-d12616d2738c6158654d9058fd788f5ec0306109.tar.bz2
ghdl-d12616d2738c6158654d9058fd788f5ec0306109.zip
Add test for duplicate error message.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug16/pkg.vhdl2
-rw-r--r--testsuite/gna/bug16/repro.vhdl29
-rw-r--r--testsuite/gna/bug16/repro1.vhdl28
-rw-r--r--testsuite/gna/bug16/repro2.vhdl18
-rwxr-xr-xtestsuite/gna/bug16/testsuite.sh14
5 files changed, 91 insertions, 0 deletions
diff --git a/testsuite/gna/bug16/pkg.vhdl b/testsuite/gna/bug16/pkg.vhdl
new file mode 100644
index 000000000..21c115a31
--- /dev/null
+++ b/testsuite/gna/bug16/pkg.vhdl
@@ -0,0 +1,2 @@
+package pkg is
+end pkg;
diff --git a/testsuite/gna/bug16/repro.vhdl b/testsuite/gna/bug16/repro.vhdl
new file mode 100644
index 000000000..d82cc5857
--- /dev/null
+++ b/testsuite/gna/bug16/repro.vhdl
@@ -0,0 +1,29 @@
+entity repro is
+end repro;
+
+architecture behav of repro is
+ component comp is
+ port (s : bit);
+ end component;
+ signal s : bit;
+begin
+ c : comp port map (s);
+end behav;
+
+entity comp is
+ port (s : bit);
+end comp;
+
+configuration conf of repro is
+ for behav
+ for c : comp
+ use entity work.compx (behav);
+ end for;
+ end for;
+end conf;
+
+architecture behav of comp is
+begin
+ assert s = '1';
+end behav;
+
diff --git a/testsuite/gna/bug16/repro1.vhdl b/testsuite/gna/bug16/repro1.vhdl
new file mode 100644
index 000000000..655307968
--- /dev/null
+++ b/testsuite/gna/bug16/repro1.vhdl
@@ -0,0 +1,28 @@
+entity repro is
+end repro;
+
+entity comp is
+ port (s : bit);
+end comp;
+
+architecture behav of repro is
+ component comp is
+ port (s : bit);
+ end component;
+ signal s : bit;
+begin
+ c : comp port map (s);
+end behav;
+
+use work.pkg.all;
+entity comp2 is
+ port (s : bit);
+end comp2;
+
+architecture behav of comp is
+ component comp2 is
+ port (s : bit);
+ end component;
+begin
+ c2: comp2 port map (s);
+end behav;
diff --git a/testsuite/gna/bug16/repro2.vhdl b/testsuite/gna/bug16/repro2.vhdl
new file mode 100644
index 000000000..869197921
--- /dev/null
+++ b/testsuite/gna/bug16/repro2.vhdl
@@ -0,0 +1,18 @@
+configuration conf of repro is
+ for behav
+ for c : comp
+ use entity work.comp;
+ for behav
+ for c2 : comp2
+ use entity work.comp2 (behav);
+ end for;
+ end for;
+ end for;
+ end for;
+end conf;
+
+architecture behav of comp2 is
+begin
+ assert s = '1';
+end behav;
+
diff --git a/testsuite/gna/bug16/testsuite.sh b/testsuite/gna/bug16/testsuite.sh
new file mode 100755
index 000000000..5311492f1
--- /dev/null
+++ b/testsuite/gna/bug16/testsuite.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure repro.vhdl
+
+analyze pkg.vhdl
+analyze repro1.vhdl
+analyze pkg.vhdl
+analyze_failure repro2.vhdl
+
+clean
+
+echo "Test successful"