aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-12-03 18:23:20 +0100
committerTristan Gingold <tgingold@free.fr>2021-12-03 18:23:20 +0100
commit48dc55952df05c12e407eb74ced73f62f4d366d2 (patch)
tree3a329bd22beac632f2c4dbf7840e5d5d942af5a7 /testsuite
parentd6f609e10715daa1fe2412aa1371dc9357d075fd (diff)
downloadghdl-48dc55952df05c12e407eb74ced73f62f4d366d2.tar.gz
ghdl-48dc55952df05c12e407eb74ced73f62f4d366d2.tar.bz2
ghdl-48dc55952df05c12e407eb74ced73f62f4d366d2.zip
testsuite/gna: add a test for conformance rules
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug0126/repro.vhdl15
-rwxr-xr-xtestsuite/gna/bug0126/testsuite.sh9
2 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gna/bug0126/repro.vhdl b/testsuite/gna/bug0126/repro.vhdl
new file mode 100644
index 000000000..eeb770897
--- /dev/null
+++ b/testsuite/gna/bug0126/repro.vhdl
@@ -0,0 +1,15 @@
+entity repro is
+end repro;
+
+architecture behav of repro is
+ subtype data_word_t is bit_vector (31 downto 0);
+
+ function f1 (data : data_word_t) return bit;
+
+ function f1 (data : bit_vector(31 downto 0)) return bit is
+ begin
+ return '0';
+ end f1;
+
+begin
+end behav;
diff --git a/testsuite/gna/bug0126/testsuite.sh b/testsuite/gna/bug0126/testsuite.sh
new file mode 100755
index 000000000..5defdcf1e
--- /dev/null
+++ b/testsuite/gna/bug0126/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure repro.vhdl
+
+clean
+
+echo "Test successful"