[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstrict-overflow-12.c
blob2837ce3a44eca4805fa58b7838ebcf7872d27b28
1 /* { dg-do compile } */
2 /* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=2" } */
4 /* Source: Ian Lance Taylor. Dual of no-strict-overflow-6.c. */
6 /* VRP test. This turns into an infinite loop when using strict
7 overflow semantics. */
9 int
10 foo ()
12 int i, bits;
13 for (i = 1, bits = 1; i > 0; i += i) /* { dg-warning "assuming signed overflow does not occur" "correct warning" { xfail *-*-* } } */
14 ++bits;
15 return bits;