This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
- From: "pixel at mandriva dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2007 22:45:12 -0000
- Subject: [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
- References: <bug-32544-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pixel at mandriva dot com 2007-08-07 22:45 -------
the following patch fixes the testcase ivopts-issue.c, but breaks everything
else... someone else will find a correct patch :)
--- gcc-4.2.1/gcc/tree-ssa-loop-ivopts.c.pix 2006-10-06 21:32:04.000000000
+0200
+++ gcc-4.2.1/gcc/tree-ssa-loop-ivopts.c 2007-08-08 00:23:49.000000000
+0200
@@ -3061,7 +3061,9 @@ get_computation_aff (struct loop *loop,
expr = fold_convert (ctype, expr);
}
- if (TYPE_UNSIGNED (utype))
+ if (POINTER_TYPE_P (utype))
+ uutype = ctype;
+ else if (TYPE_UNSIGNED (utype))
uutype = utype;
else
{
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32544