https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102805
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-10-17 Ever confirmed|0 |1 Keywords| |missed-optimization --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to rudick from comment #2) > Interesting. > > if (f && end > start && start < 100 && end < 100) { > > & I still get the warning though There is a missed VRP for that case: Testcase for the above case: void f1(uint64_t start, uint64_t end) { if (end > start && start < 100 && end < 100) { uint64_t t = end - start + 1; if (t != 0) __builtin_abort(); } }