aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1212
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-11 15:32:15 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-11 15:32:15 +0200
commitf6b61769014221f190b68c3bae4acac1441f79b5 (patch)
treee78b66f72923d0c4653cac903f6a51a81ad2267e /testsuite/synth/issue1212
parentc95e2485645b30aca44f3eed6d8d5e6e83cac2ff (diff)
downloadghdl-f6b61769014221f190b68c3bae4acac1441f79b5.tar.gz
ghdl-f6b61769014221f190b68c3bae4acac1441f79b5.tar.bz2
ghdl-f6b61769014221f190b68c3bae4acac1441f79b5.zip
testsuite/synth: add test for #1212
Diffstat (limited to 'testsuite/synth/issue1212')
-rw-r--r--testsuite/synth/issue1212/fileissue.vhdl29
-rwxr-xr-xtestsuite/synth/issue1212/testsuite.sh7
2 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/synth/issue1212/fileissue.vhdl b/testsuite/synth/issue1212/fileissue.vhdl
new file mode 100644
index 000000000..fe25c38ca
--- /dev/null
+++ b/testsuite/synth/issue1212/fileissue.vhdl
@@ -0,0 +1,29 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use STD.TEXTIO.all;
+
+entity fileissue is
+ generic(
+ data_width : integer := 4
+ );
+ port(
+ clk : in std_logic;
+ di : in std_logic_vector(data_width - 1 downto 0);
+ do : out std_logic_vector(data_width - 1 downto 0)
+ );
+end fileissue;
+
+architecture behavioral of fileissue is
+ file results : text;
+begin
+ process(clk)
+ variable txtline : line;
+ variable file_status : file_open_status;
+ begin
+ file_open(file_status, results, "explicit.dat", write_mode);
+ write(txtline, string'("--------------------"));
+ writeline(results, txtline);
+ end process;
+
+end behavioral;
+
diff --git a/testsuite/synth/issue1212/testsuite.sh b/testsuite/synth/issue1212/testsuite.sh
new file mode 100755
index 000000000..6c89b999e
--- /dev/null
+++ b/testsuite/synth/issue1212/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_failure fileissue.vhdl -e
+
+echo "Test successful"