https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95047
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- That is because when GCC does for -Og: [t666.c:6:12] _1 = left_6(D) >= 0; [t666.c:6:34] _2 = right_7(D) >= 0; [t666.c:6:17] _3 = _1 & _2; [t666.c:7:7] if (_3 != 0) This "optimization" happens at early on. I have not looked into why the line numbers are different.