[Bug tree-optimization/55616] bogus warning about undefined overflow after overflow check

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 31 11:21:00 GMT 2013


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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-31 11:20:41 UTC ---
You haven't provided preprocessed testcase, if
number_of_elements_in_path is unsigned short, then supposedly the compiler
could figure out that number_of_elements_in_path + 100 never overflows (on
targets where sizeof (short) < sizeof (int)), but supposedly the optimization
in that case might not see that one of the + operands has been zero extended
and the other is either constant, or zero extended too.



More information about the Gcc-bugs mailing list