summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold2015-05-11 00:57:06 +0200
committerTristan Gingold2015-05-11 00:57:06 +0200
commit4fb0d372c17309ed4c5e2f011d8fa11e89f3295e (patch)
treebb102a71365ec7804fb3fb686f54cf118b79ef93 /testsuite
parentc89a5680b88cf17056595d48e67fc28ba18f6910 (diff)
downloadghdl-4fb0d372c17309ed4c5e2f011d8fa11e89f3295e.tar.gz
ghdl-4fb0d372c17309ed4c5e2f011d8fa11e89f3295e.tar.bz2
ghdl-4fb0d372c17309ed4c5e2f011d8fa11e89f3295e.zip
Add ticket50 testcase.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/ticket50/ent.vhdl16
-rw-r--r--testsuite/gna/ticket50/ent2.vhdl23
-rwxr-xr-xtestsuite/gna/ticket50/testsuite.sh10
3 files changed, 49 insertions, 0 deletions
diff --git a/testsuite/gna/ticket50/ent.vhdl b/testsuite/gna/ticket50/ent.vhdl
new file mode 100644
index 0000000..c1cc8d3
--- /dev/null
+++ b/testsuite/gna/ticket50/ent.vhdl
@@ -0,0 +1,16 @@
+entity ent is
+end entity;
+
+architecture a of ent is
+ type enum_t is (cond);
+ impure function cond return boolean is
+ begin
+ return false;
+ end function;
+begin
+ main : process
+ begin
+ if cond then
+ end if;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket50/ent2.vhdl b/testsuite/gna/ticket50/ent2.vhdl
new file mode 100644
index 0000000..e8a0aba
--- /dev/null
+++ b/testsuite/gna/ticket50/ent2.vhdl
@@ -0,0 +1,23 @@
+entity ent is
+end entity;
+
+package pkg1 is
+ function cond return boolean;
+end pkg1;
+
+package pkg2 is
+ function cond return boolean;
+end pkg2;
+
+use work.pkg1.all;
+use work.pkg2.all;
+
+architecture a of ent is
+ type enum_t is (cond);
+begin
+ main : process
+ begin
+ if cond then
+ end if;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket50/testsuite.sh b/testsuite/gna/ticket50/testsuite.sh
new file mode 100755
index 0000000..3313524
--- /dev/null
+++ b/testsuite/gna/ticket50/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze --std=08 ent.vhdl
+analyze_failure --std=08 ent2.vhdl
+
+GHDL_STD_FLAGS=--std=08 clean
+
+echo "Test successful"