This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[fortran,committed] Fix PR 36197, regression cause by module string quoting patch
- From: FX <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 May 2008 17:50:18 +0100
- Subject: [fortran,committed] Fix PR 36197, regression cause by module string quoting patch
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/