[patch, libfortran] [4.4/4.5 Regression] changed BACKSPACE behaviour at end of file.

Jerry DeLisle jvdelisle@verizon.net
Sat Jun 6 17:22:00 GMT 2009


The following patch fixes this regression.

Regression tested and NIST tested on x86-64.

OK for trunk and 4.4.1? (with ChangeLog and a test case of course)

Jerry

Index: list_read.c
===================================================================
--- list_read.c	(revision 147996)
+++ list_read.c	(working copy)
@@ -1687,6 +1687,11 @@ list_formatted_read_scalar (st_parameter
    if (setjmp (eof_jump))
      {
        generate_error (&dtp->common, LIBERROR_END, NULL);
+	if (!is_internal_unit (dtp))
+	  {
+	    dtp->u.p.current_unit->endfile = AFTER_ENDFILE;
+	    dtp->u.p.current_unit->current_record = 0;
+	  }
        goto cleanup;
      }



More information about the Fortran mailing list