From 2153aea92dfa3f28990f00f85fcff3a552ee21b0 Mon Sep 17 00:00:00 2001
From: Tristan Gingold <tgingold@free.fr>
Date: Tue, 2 Jun 2015 21:55:06 +0200
Subject: Testcase for duplicate subprogram body.

---
 testsuite/gna/bug14/bug.vhdl     | 15 +++++++++++++++
 testsuite/gna/bug14/bug2.vhdl    |  4 ++++
 testsuite/gna/bug14/bug3.vhdl    |  7 +++++++
 testsuite/gna/bug14/testsuite.sh | 10 ++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 testsuite/gna/bug14/bug.vhdl
 create mode 100644 testsuite/gna/bug14/bug2.vhdl
 create mode 100644 testsuite/gna/bug14/bug3.vhdl
 create mode 100755 testsuite/gna/bug14/testsuite.sh

(limited to 'testsuite/gna')

diff --git a/testsuite/gna/bug14/bug.vhdl b/testsuite/gna/bug14/bug.vhdl
new file mode 100644
index 000000000..bb0c4a1bf
--- /dev/null
+++ b/testsuite/gna/bug14/bug.vhdl
@@ -0,0 +1,15 @@
+package pkg is
+  function f (a : integer) return integer;
+end pkg;
+
+package body pkg is
+  function f (a : integer) return integer is
+  begin
+   return 1;
+  end f;
+
+  function f (a : integer) return integer is
+  begin
+   return 1;
+  end f;
+end pkg;
diff --git a/testsuite/gna/bug14/bug2.vhdl b/testsuite/gna/bug14/bug2.vhdl
new file mode 100644
index 000000000..4e03e6c04
--- /dev/null
+++ b/testsuite/gna/bug14/bug2.vhdl
@@ -0,0 +1,4 @@
+package pkg2 is
+  function f (a : integer) return integer;
+  function f (a : integer) return integer;
+end pkg2;
diff --git a/testsuite/gna/bug14/bug3.vhdl b/testsuite/gna/bug14/bug3.vhdl
new file mode 100644
index 000000000..a94da5781
--- /dev/null
+++ b/testsuite/gna/bug14/bug3.vhdl
@@ -0,0 +1,7 @@
+package pkg3 is
+  function f (a : integer) return integer;
+  function f (a : integer) return integer is
+  begin
+   return 1;
+  end f;
+end pkg3;
diff --git a/testsuite/gna/bug14/testsuite.sh b/testsuite/gna/bug14/testsuite.sh
new file mode 100755
index 000000000..27deff22e
--- /dev/null
+++ b/testsuite/gna/bug14/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure bug.vhdl
+analyze_failure bug2.vhdl
+analyze_failure bug3.vhdl
+clean
+
+echo "Test successful"
-- 
cgit v1.2.3