This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]