https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91475
--- Comment #2 from Eric Musser ---
But in this case the undefineness is not directly related to the for loop.
Further the optimizer that changes the loop to maintain and compare j *
0x2001 as opposed to just j could detect certain overflow a
++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric_musser at yahoo dot com
Target Milestone: ---
The following code on x86-64 9.2.0 compiled with:
gcc -Wall -O2
unexpectedly produces wrong output and an infinite loop:
#include
#include
int main(int argc, char** argv