[Bug libfortran/48787] Invalid UP rounding with F editing

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 29 06:05:00 GMT 2011


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

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-04-29 05:59:45 UTC ---
A tentative patch:

Index: write_float.def
===================================================================
--- write_float.def    (revision 172909)
+++ write_float.def    (working copy)
@@ -289,8 +289,9 @@
     }
   else if (nbefore + nafter < ndigits)
     {
-      ndigits = nbefore + nafter;
-      i = ndigits;
+      i = ndigits = nbefore + nafter;
+      if (d == 0 && digits[1] == '0')
+    goto skip;
       if (digits[i] >= rchar)
     {
       /* Propagate the carry.  */



More information about the Gcc-bugs mailing list