[Bug tree-optimization/48702] [4.6/4.7 Regression] optimization regression with gcc-4.6 on x86_64-unknown-linux-gnu
rakdver at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 21 11:50:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702
--- Comment #6 from Zdenek Dvorak <rakdver at gcc dot gnu.org> 2011-04-21 11:49:36 UTC ---
I think we rely on the assumption that pointer arithmetics satisfies the
restrictions of C standard (i.e., that the pointer is within a single memory
object) on more places than just this one. So, if the code produced by ivopts
is indeed
for (p = &a; p != &a - 3; --p)
*(p + 3) = ...
this could potentially cause other problems other than with alias analysis.
But, I would expect the code from ivopts to be rather
for (p = &a; ...; p = (pointer) ((unsigned) p - 1)
*((pointer) ((unsigned) p + 3)) = ...
Which should be a valid code. Is that the case? If so, fixing alias analysis
would be the proper solution.
More information about the Gcc-bugs
mailing list