aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug20771/20771.vhd
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/bug20771/20771.vhd')
-rw-r--r--testsuite/gna/bug20771/20771.vhd31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/gna/bug20771/20771.vhd b/testsuite/gna/bug20771/20771.vhd
new file mode 100644
index 000000000..55968ae30
--- /dev/null
+++ b/testsuite/gna/bug20771/20771.vhd
@@ -0,0 +1,31 @@
+entity Jon is
+end Jon;
+
+use std.textio.all;
+
+architecture Taylor of Jon is
+begin
+
+process is
+ variable buf:line;
+ variable s : string(1 to 1);
+
+ variable fstatus : file_open_status;
+ file readfile : text;
+ constant temp_string : string := "hello.txt";
+begin
+ file_open(fstatus, readfile, temp_string, read_mode);
+ report "open " & file_open_status'image(fstatus) severity note;
+ if fstatus = OPEN_OK then
+-- while not endfile(readfile)
+ loop
+ readline(readfile, buf);
+ read(buf, s);
+ report "s= "& s severity note;
+ end loop;
+ end if;
+ report "done" severity note;
+ wait;
+end process;
+
+end Taylor;