This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]