[Bug c/54945] Too strong non-aliasing analysis?

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 17 12:07:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-17
                 CC|                            |jakub at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-17 12:06:59 UTC ---
Doesn't look like alias analysis to me, I'd say the problem is in
fold_sign_changed_comparison which has:

  if ((TYPE_UNSIGNED (inner_type) != TYPE_UNSIGNED (outer_type)
       || POINTER_TYPE_P (inner_type) != POINTER_TYPE_P (outer_type))
      && code != NE_EXPR
      && code != EQ_EXPR)
    return NULL_TREE;

While for TYPE_UNSIGNED changes NE_EXPR/EQ_EXPR are just fine, for
POINTER_TYPE_P changes I'm afraid we just need to be conservative.



More information about the Gcc-bugs mailing list