https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92364
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The warning is correct. > - Similarly, commenting out unrelated code, makes the warning disappear: Because jump threading did not happen then. The code is all undefined anyways due to the uninitilize struct anyways. When you initilize it to 0, the value 0 is constant prop to the right locations ad there for you get 0> (1) which is always false. The warning is for "my_y > (yMax+1)" and my_y is a reference to this->Num_Y and yMax was a value of this->Num_Y at the begining of the function.