mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-30 12:20:06 +08:00
suppress code after continue as well
fix an oversight in code suppression
This commit is contained in:
parent
d27ea5155f
commit
5c862a08b4
2
tccgen.c
2
tccgen.c
@ -6275,6 +6275,7 @@ static void block(int *bsym, int *csym, int is_expr)
|
|||||||
*csym = gjmp(*csym);
|
*csym = gjmp(*csym);
|
||||||
next();
|
next();
|
||||||
skip(';');
|
skip(';');
|
||||||
|
nocode_wanted |= 0x20000000;
|
||||||
} else if (tok == TOK_FOR) {
|
} else if (tok == TOK_FOR) {
|
||||||
int e;
|
int e;
|
||||||
int saved_nocode_wanted;
|
int saved_nocode_wanted;
|
||||||
@ -7670,7 +7671,6 @@ found:
|
|||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
ad.a.aligned = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1374,6 +1374,12 @@ void optimize_out(void)
|
|||||||
printf("ool6:%d\n", defined_function());
|
printf("ool6:%d\n", defined_function());
|
||||||
goto breakhere;
|
goto breakhere;
|
||||||
}
|
}
|
||||||
|
j = 1;
|
||||||
|
while (j) {
|
||||||
|
j--;
|
||||||
|
continue;
|
||||||
|
printf("ool7:%d\n", undefined_function());
|
||||||
|
}
|
||||||
|
|
||||||
/* Test that constants in logical && are optimized: */
|
/* Test that constants in logical && are optimized: */
|
||||||
i = 0 && undefined_function();
|
i = 0 && undefined_function();
|
||||||
|
Loading…
Reference in New Issue
Block a user