void test(unsigned n, unsigned min) { unsigned i = 0; while (n >= min) { n = testfunc(n); if (++i > 100) printf("i greater than 100\n"); } }
int main(){ test(100,0); }
This small piece of code should repeat printing "i greater than 100" but by setting any optimization level will stuck. The problem is the "jnz"-Opcode for testing i against zero.