aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue666
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-10-25 05:09:35 +0200
committerTristan Gingold <tgingold@free.fr>2018-10-25 05:09:35 +0200
commitb8aab31a05e081029adcc62b134c4dd2f20e1e01 (patch)
tree8d3e730335d6c6927bf42397dd9fca2c88feb8ff /testsuite/gna/issue666
parent505a68018797612c4d88f1f871a2450a93a15767 (diff)
downloadghdl-b8aab31a05e081029adcc62b134c4dd2f20e1e01.tar.gz
ghdl-b8aab31a05e081029adcc62b134c4dd2f20e1e01.tar.bz2
ghdl-b8aab31a05e081029adcc62b134c4dd2f20e1e01.zip
Add testcase for #666
Diffstat (limited to 'testsuite/gna/issue666')
-rw-r--r--testsuite/gna/issue666/tb.vhdl21
-rw-r--r--testsuite/gna/issue666/tb2.vhdl21
-rwxr-xr-xtestsuite/gna/issue666/testsuite.sh10
3 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/gna/issue666/tb.vhdl b/testsuite/gna/issue666/tb.vhdl
new file mode 100644
index 000000000..cb3b338de
--- /dev/null
+++ b/testsuite/gna/issue666/tb.vhdl
@@ -0,0 +1,21 @@
+entity tb is
+end entity;
+architecture bench of tb is
+ constant kill_size : positive := 50331648;
+ signal s : string(1 to kill_size);
+
+ function fun return string is
+ variable v : string(1 to kill_size);
+ begin
+ return "hello";
+ end;
+begin
+ proc: process
+ -- Segmentation fault occurs for variable too, but much faster
+-- variable s : string(1 to kill_size);
+ begin
+-- s := fun;
+ s <= fun;
+ report "pass" severity failure;
+ end process;
+end bench;
diff --git a/testsuite/gna/issue666/tb2.vhdl b/testsuite/gna/issue666/tb2.vhdl
new file mode 100644
index 000000000..c7c5a35f8
--- /dev/null
+++ b/testsuite/gna/issue666/tb2.vhdl
@@ -0,0 +1,21 @@
+entity tb2 is
+end entity;
+architecture bench of tb2 is
+ constant kill_size : positive := 50331648;
+-- signal s : string(1 to kill_size);
+
+ function fun return string is
+ variable v : string(1 to kill_size);
+ begin
+ return "hello";
+ end;
+begin
+ proc: process
+ -- Segmentation fault occurs for variable too, but much faster
+ variable s : string(1 to kill_size);
+ begin
+ s := fun;
+-- s <= fun;
+ report "pass" severity failure;
+ end process;
+end bench;
diff --git a/testsuite/gna/issue666/testsuite.sh b/testsuite/gna/issue666/testsuite.sh
new file mode 100755
index 000000000..7a6bed293
--- /dev/null
+++ b/testsuite/gna/issue666/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze tb.vhdl
+analyze tb2.vhdl
+
+clean
+
+echo "Test successful"