PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstrict-overflow-14.c
blobdda07ea733b65dc2cea85d159aefd139771a7ccf
1 /* { dg-do compile } */
2 /* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=4" } */
4 /* Source: Ian Lance Taylor. */
6 int
7 foo (int j)
9 int i;
10 int sum = 0;
12 for (i = 1; i < j; i += i)
13 sum += i / 16; /* { dg-warning "assuming signed overflow does not occur" "" { xfail *-*-* } } */
14 return sum;