aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-10-08 10:40:36 +0200
committerTristan Gingold <tgingold@free.fr>2022-10-08 10:40:36 +0200
commit9fbdffe8e76a9ff1a71e631914bf75f362b36be7 (patch)
tree4501543a8b9993b9ec2c8ce25ed9bd349d0dc50c /testsuite
parent6701cd2f930da2df4a4922d7aecfa46659bbb223 (diff)
downloadghdl-9fbdffe8e76a9ff1a71e631914bf75f362b36be7.tar.gz
ghdl-9fbdffe8e76a9ff1a71e631914bf75f362b36be7.tar.bz2
ghdl-9fbdffe8e76a9ff1a71e631914bf75f362b36be7.zip
testsuite/gna: add a test for #2209
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue2209/e.vhdl12
-rwxr-xr-xtestsuite/gna/issue2209/testsuite.sh7
2 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/gna/issue2209/e.vhdl b/testsuite/gna/issue2209/e.vhdl
new file mode 100644
index 000000000..34971a281
--- /dev/null
+++ b/testsuite/gna/issue2209/e.vhdl
@@ -0,0 +1,12 @@
+entity e is end;
+architecture a of e is
+ --crash
+ procedure p(arg : string(1 to (1)));
+ procedure p(arg : string(1 to (1))) is begin end;
+
+ --no crash
+ --procedure p(arg : string(1 to 1));
+ --procedure p(arg : string(1 to 1)) is begin end;
+begin
+ assert false severity failure;
+end;
diff --git a/testsuite/gna/issue2209/testsuite.sh b/testsuite/gna/issue2209/testsuite.sh
new file mode 100755
index 000000000..52d727e67
--- /dev/null
+++ b/testsuite/gna/issue2209/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+"$GHDL" --reprint e.vhdl > reprint_e.vhdl
+
+echo "Test successful"