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/56250] Wrong constant folding on unsigned int


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-08 11:24:02 UTC ---
Created attachment 29394
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29394
gcc48-pr56250.patch

Untested fix.

I believe only division/modulus is problematic, not multiplication, and I think
-fwrapv signed types are fine too.  For *_DIV_EXPR/*_MOD_EXPR, I think
wide_type is always NULL_TREE and ctype is always equal to type.


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