aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-12 22:42:46 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-12 22:42:46 +0200
commit0223ee3f9267f5cb8ff9e2274c0c4c26efc515fc (patch)
treee797d1d30773aaff52b7228cfbde425b8a99c2ff
parent1c8b894c429a29a34ac251c5536ececd18bac048 (diff)
downloadghdl-0223ee3f9267f5cb8ff9e2274c0c4c26efc515fc.tar.gz
ghdl-0223ee3f9267f5cb8ff9e2274c0c4c26efc515fc.tar.bz2
ghdl-0223ee3f9267f5cb8ff9e2274c0c4c26efc515fc.zip
Testcase for ticket 57.
-rw-r--r--testsuite/gna/ticket57/test.vhdl24
-rwxr-xr-xtestsuite/gna/ticket57/testsuite.sh11
2 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/gna/ticket57/test.vhdl b/testsuite/gna/ticket57/test.vhdl
new file mode 100644
index 000000000..3e453a2dc
--- /dev/null
+++ b/testsuite/gna/ticket57/test.vhdl
@@ -0,0 +1,24 @@
+use std.textio.all;
+
+entity test is
+end entity;
+
+architecture a of test is
+ type file_t is file of character;
+ function fun(var : boolean) return boolean is
+ file f : file_t;
+ variable l : line;
+ begin
+ file_open(f, "filename.txt", write_mode);
+ write(f, character'( 'x' ));
+ write(f, LF);
+ file_close(f);
+ return var;
+ end function;
+begin
+ main : process
+ constant c : boolean := fun(false);
+ begin
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket57/testsuite.sh b/testsuite/gna/ticket57/testsuite.sh
new file mode 100755
index 000000000..25127f721
--- /dev/null
+++ b/testsuite/gna/ticket57/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze test.vhdl
+analyze_failure --std=93 test.vhdl
+analyze --std=93 -frelaxed-rules test.vhdl
+
+clean
+
+echo "Test successful"