aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket74
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-20 21:26:52 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-20 21:26:52 +0200
commite83033f53ffe78b0d3698a6bcf9c61824f97abc8 (patch)
tree52ced7f6fd9246175c81329254b9df2feb9f9de0 /testsuite/gna/ticket74
parent8697fde9747e6f9ae5ddb2eff57f854773caf6db (diff)
downloadghdl-e83033f53ffe78b0d3698a6bcf9c61824f97abc8.tar.gz
ghdl-e83033f53ffe78b0d3698a6bcf9c61824f97abc8.tar.bz2
ghdl-e83033f53ffe78b0d3698a6bcf9c61824f97abc8.zip
Testcase for ticket 74.
Diffstat (limited to 'testsuite/gna/ticket74')
-rw-r--r--testsuite/gna/ticket74/bug.vhdl15
-rwxr-xr-xtestsuite/gna/ticket74/testsuite.sh9
2 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gna/ticket74/bug.vhdl b/testsuite/gna/ticket74/bug.vhdl
new file mode 100644
index 000000000..bae04dad6
--- /dev/null
+++ b/testsuite/gna/ticket74/bug.vhdl
@@ -0,0 +1,15 @@
+entity ent is
+end entity;
+
+architecture a of ent is
+ function fun(s : string) return integer is
+ begin
+ return 0;
+ end;
+begin
+ main : process
+ begin
+ assert fun(s(4 to 15) => "Hello world!") = 0;
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket74/testsuite.sh b/testsuite/gna/ticket74/testsuite.sh
new file mode 100755
index 000000000..0440719e6
--- /dev/null
+++ b/testsuite/gna/ticket74/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze bug.vhdl
+elab_simulate ent
+clean
+
+echo "Test successful"