suppress code after continue as well

fix an oversight in code suppression
This commit is contained in:
Michael Matz 2019-01-31 00:37:49 +01:00
parent d27ea5155f
commit 5c862a08b4
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -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();