This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36421] Gw.d edit descriptor for integer numbers: Wrong output
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2008 01:19:43 -0000
- Subject: [Bug fortran/36421] Gw.d edit descriptor for integer numbers: Wrong output
- References: <bug-36421-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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