[fortran,committed] Fix PR 36197, regression cause by module string quoting patch
FX
fxcoudert@gmail.com
Sat May 10 16:51:00 GMT 2008
Patch below committed to mainline to fix PR 36197, a regression
caused by my "module patch widechar" patch (accessing invalid memory,
as seen under valgrind): I got the sprintf format wrong ("%ux" is not
a valid format, it needs to be "%x"). Committed as obvious after
regtesting on x86_64-linux.
FX
2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36197
* module.c (quote_string): Fix sprintf format.
--- trunk/gcc/fortran/module.c 2008/05/10 15:08:43 135153
+++ trunk/gcc/fortran/module.c 2008/05/10 16:39:27 135154
@@ -1502,7 +1502,7 @@
*q++ = '\\', *q++ = '\\';
else if (!gfc_wide_is_printable (*p))
{
- sprintf (q, "\\U%08" HOST_WIDE_INT_PRINT "ux",
+ sprintf (q, "\\U%08" HOST_WIDE_INT_PRINT "x",
(unsigned HOST_WIDE_INT) *p);
q += 10;
}
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/
More information about the Fortran
mailing list