[Bug fortran/32678] GFortan works incorrectly when writing with FORMAT Tx

jvdelisle at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jul 8 22:37:00 GMT 2007



------- Comment #2 from jvdelisle at gcc dot gnu dot org  2007-07-08 22:37 -------
This appears to fix it: Still testing

Index: transfer.c
===================================================================
--- transfer.c  (revision 126449)
+++ transfer.c  (working copy)
@@ -1213,6 +1213,8 @@ formatted_transfer_scalar (st_parameter_
          dtp->u.p.skips = dtp->u.p.skips + pos - bytes_used;
          dtp->u.p.pending_spaces = dtp->u.p.pending_spaces
                                    + pos - dtp->u.p.max_pos;
+         dtp->u.p.pending_spaces = dtp->u.p.pending_spaces < 0
+                                   ? 0 : dtp->u.p.pending_spaces;

          if (dtp->u.p.skips == 0)
            break;


-- 


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



More information about the Gcc-bugs mailing list