This is the mail archive of the gcc-bugs@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]

[Bug fortran/36421] Gw.d edit descriptor for integer numbers: Wrong output



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2008-06-05 01:19 -------
The patch in comment#1 fails, printing nothing for a value of zero.  This patch
works OK:

Index: write.c
===================================================================
--- write.c     (revision 136387)
+++ write.c     (working copy)
@@ -368,6 +368,9 @@ write_decimal (st_parameter_dt *dtp, con

   digits = strlen (q);

+  if (f->format == FMT_G)
+    m = 0;
+
   /* Select a width if none was specified.  The idea here is to always
      print something.  */

I will commit under simple and obvious rule.


-- 


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


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