aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-12 06:52:09 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-12 06:52:09 +0100
commit85c222d979afd8077568b0c2de4eb922bf34efd2 (patch)
tree45afffd8ee755eabbda595fe3515458d9adedf41
parent98c4de59417b92b3b270afc27f9cab2f3dd7e45b (diff)
downloadghdl-85c222d979afd8077568b0c2de4eb922bf34efd2.tar.gz
ghdl-85c222d979afd8077568b0c2de4eb922bf34efd2.tar.bz2
ghdl-85c222d979afd8077568b0c2de4eb922bf34efd2.zip
Add testcase for previous patch.
-rw-r--r--testsuite/gna/bug092/t.vhdl7
-rw-r--r--testsuite/gna/bug092/t2.vhdl7
-rwxr-xr-xtestsuite/gna/bug092/testsuite.sh9
3 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/gna/bug092/t.vhdl b/testsuite/gna/bug092/t.vhdl
new file mode 100644
index 000000000..d6850bf56
--- /dev/null
+++ b/testsuite/gna/bug092/t.vhdl
@@ -0,0 +1,7 @@
+package t is
+ type str_acc is access string;
+
+ function my_alloc (v : natural) return str_acc;
+ attribute foreign of my_alloc : function is "VHPIDIRECT";
+end t;
+
diff --git a/testsuite/gna/bug092/t2.vhdl b/testsuite/gna/bug092/t2.vhdl
new file mode 100644
index 000000000..6de94a7e2
--- /dev/null
+++ b/testsuite/gna/bug092/t2.vhdl
@@ -0,0 +1,7 @@
+package t is
+ type str_acc is access string;
+
+ function my_alloc (v : natural) return str_acc;
+ attribute foreign of my_alloc : function is "VHPIDIRECT myalloc";
+end t;
+
diff --git a/testsuite/gna/bug092/testsuite.sh b/testsuite/gna/bug092/testsuite.sh
new file mode 100755
index 000000000..8cd06d676
--- /dev/null
+++ b/testsuite/gna/bug092/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure t.vhdl
+
+clean
+
+echo "Test successful"