This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix PR37484
- From: "Sebastian Pop" <sebpop at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Diego Novillo" <dnovillo at google dot com>
- Date: Fri, 12 Sep 2008 11:57:25 -0500
- Subject: [patch] Fix PR37484
Diego,
Can you look at: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37484
The fix reverts the code that I added to address one of the comments
from your review of the graphite code.
Thanks,
Sebastian
PR tree-optimization/37484
* graphite.c (save_var_name): Fix invalid read/write.
Index: graphite.c
===================================================================
--- graphite.c (revision 140291)
+++ graphite.c (working copy)
@@ -1989,12 +1989,12 @@
if (name)
{
nv[i] = XNEWVEC (char, strlen (name) + 12);
- sprintf (nv[i], "%s_%12d", name, SSA_NAME_VERSION (p->t));
+ sprintf (nv[i], "%s_%d", name, SSA_NAME_VERSION (p->t));
}
else
{
nv[i] = XNEWVEC (char, 12);
- sprintf (nv[i], "T_%12d", SSA_NAME_VERSION (p->t));
+ sprintf (nv[i], "T_%d", SSA_NAME_VERSION (p->t));
}
p->name = nv[i];