https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107277
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Component|c |tree-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2022-10-20 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. We are able to figure it out if the condition was set to a bool and used inside the if but not through the __builtin_expect. That is foo1 in the attached testcase does not warn and figures out it is positive.