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 middle-end/58564] [4.7/4.8/4.9 Regression] possible wrong code bug at -O0


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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30933
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30933&action=edit
gcc49-pr58564-nonnegative.patch

Actually, teaching fold that it should fold that < 0 into 0 is easy, just needs
making some checks less strict (they were considering only INTEGER_TYPE,
forgetting about BOOLEAN_TYPE or ENUMERAL_TYPE which IMHO can be handled the
same).  This latter patch I'm obviously not going to propose for the older
branches.


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