aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue2165
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue2165')
-rw-r--r--testsuite/gna/issue2165/e.vhdl13
-rwxr-xr-xtestsuite/gna/issue2165/testsuite.sh13
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/issue2165/e.vhdl b/testsuite/gna/issue2165/e.vhdl
new file mode 100644
index 000000000..1938ade32
--- /dev/null
+++ b/testsuite/gna/issue2165/e.vhdl
@@ -0,0 +1,13 @@
+entity e is end;
+architecture a of e is
+
+ -- Body mismatches declaration because 'arg' is not marked constant.
+ -- However constant is the default value when not specified
+ function f1(constant arg : bit) return bit;
+ function f1( arg : bit) return bit
+ is
+ begin
+ return '0';
+ end;
+begin
+end;
diff --git a/testsuite/gna/issue2165/testsuite.sh b/testsuite/gna/issue2165/testsuite.sh
new file mode 100755
index 000000000..4545d99cc
--- /dev/null
+++ b/testsuite/gna/issue2165/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=93
+analyze_failure e.vhdl
+
+export GHDL_STD_FLAGS=--std=93c
+analyze e.vhdl
+
+clean
+
+echo "Test successful"