Improve constant propagation with "&&" and "||".

This commit is contained in:
Edmund Grimley Evans
2015-11-20 23:33:49 +00:00
parent c7067aeb84
commit 3ff77a1d6f
3 changed files with 58 additions and 52 deletions

View File

@ -17,9 +17,13 @@ void f2(void)
{
goto start;
{
int a[1 ? 1 : 1]; /* not a variable-length array */
int a[1 && 1]; /* not a variable-length array */
int b[1 || 1]; /* not a variable-length array */
int c[1 ? 1 : 1]; /* not a variable-length array */
start:
a[0] = 0;
b[0] = 0;
c[0] = 0;
}
}