aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket63
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-14 22:08:19 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-14 22:08:19 +0200
commitadd7dec17997f8678ed6ba5061ed1abe86865496 (patch)
tree24fb83ebe48ec8b88701af918fec127d97207ad5 /testsuite/gna/ticket63
parentb8295177d57530f71af9f9163e97d840095fd39d (diff)
downloadghdl-add7dec17997f8678ed6ba5061ed1abe86865496.tar.gz
ghdl-add7dec17997f8678ed6ba5061ed1abe86865496.tar.bz2
ghdl-add7dec17997f8678ed6ba5061ed1abe86865496.zip
Testcase for ticket 63.
Diffstat (limited to 'testsuite/gna/ticket63')
-rw-r--r--testsuite/gna/ticket63/bug.vhdl14
-rwxr-xr-xtestsuite/gna/ticket63/testsuite.sh8
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/gna/ticket63/bug.vhdl b/testsuite/gna/ticket63/bug.vhdl
new file mode 100644
index 000000000..4c32a5b93
--- /dev/null
+++ b/testsuite/gna/ticket63/bug.vhdl
@@ -0,0 +1,14 @@
+entity ent is
+end entity;
+
+architecture a of ent is
+begin
+ main : process is
+ constant str : string(1 to 3) := "abc";
+ type line is access string;
+ variable l : line;
+ begin
+ l := new str(1 to 2); -- Crashes
+ l := new string'(str(1 to 2)); -- Works
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket63/testsuite.sh b/testsuite/gna/ticket63/testsuite.sh
new file mode 100755
index 000000000..e2d8f1e03
--- /dev/null
+++ b/testsuite/gna/ticket63/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure bug.vhdl
+clean
+
+echo "Test successful"