diff --git a/tccgen.c b/tccgen.c index 20f85d58..1a75aba1 100644 --- a/tccgen.c +++ b/tccgen.c @@ -6275,6 +6275,7 @@ static void block(int *bsym, int *csym, int is_expr) *csym = gjmp(*csym); next(); skip(';'); + nocode_wanted |= 0x20000000; } else if (tok == TOK_FOR) { int e; int saved_nocode_wanted; @@ -7670,7 +7671,6 @@ found: } next(); } - ad.a.aligned = 0; } } return 0; diff --git a/tests/tcctest.c b/tests/tcctest.c index 3dc9f1db..940e7d07 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -1374,6 +1374,12 @@ void optimize_out(void) printf("ool6:%d\n", defined_function()); goto breakhere; } + j = 1; + while (j) { + j--; + continue; + printf("ool7:%d\n", undefined_function()); + } /* Test that constants in logical && are optimized: */ i = 0 && undefined_function();