[Bug libfortran/31099] [4.3/4.2 regression] Runtime error on legal code using RECL

jvdelisle at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 9 18:02:00 GMT 2007



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2007-03-09 18:02 -------
I believe I have a fix.  I am testing now.  We were not initializing a few
things when we have a record length given.

Index: io/open.c
===================================================================
--- io/open.c   (revision 122529)
+++ io/open.c   (working copy)
@@ -437,6 +437,8 @@ new_unit (st_parameter_open *opp, gfc_un
     {
       u->flags.has_recl = 1;
       u->recl = opp->recl_in;
+      u->recl_subrecord = u->recl;
+      u->bytes_left = u->recl;
     }
   else
     {


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31099



More information about the Gcc-bugs mailing list