Fix libgfortran/io/write.c patch
Andreas Jaeger
aj@suse.de
Sun May 15 15:32:00 GMT 2005
My patch to io/write.c was wrong, I didn't notice that the
gfortran.dg/namelist_14.f90 were failing. The problem is that
st_sprintf is not a fullblown sprintf implementation :-(
I've tested this patch on Linux/x86-64 and commit it (partly reverting
my previous patch),
Andreas
2005-05-15 Andreas Jaeger <aj@suse.de>
* io/write.c (nml_write_obj): Use %d again - and cast to int,
st_sprintf does not handle %ld.
============================================================
Index: libgfortran/io/write.c
--- io/write.c 15 May 2005 12:49:40 -0000 1.35
+++ io/write.c 15 May 2005 15:19:36 -0000
@@ -1490,7 +1490,7 @@ nml_write_obj (namelist_info * obj, inde
{
strcat (ext_name, dim_i ? "" : "(");
clen = strlen (ext_name);
- st_sprintf (ext_name + clen, "%ld", (long) obj->ls[dim_i].idx);
+ st_sprintf (ext_name + clen, "%d", (int) obj->ls[dim_i].idx);
strcat (ext_name, (dim_i == obj->var_rank - 1) ? ")" : ",");
}
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050515/95f57aa7/attachment.sig>
More information about the Fortran
mailing list