1 /* { dg-do compile } */
2 /* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
4 /* Don't warn about an overflow when folding i > 0. The loop analysis
5 should determine that i does not wrap.
7 The test is really bogus, p->a - p->b can be larger than INT_MAX
8 and thus i can very well wrap. */
10 struct c
{ unsigned int a
; unsigned int b
; };
11 extern void bar (struct c
*);
18 for (i
= 0; i
< p
->a
- p
->b
; ++i
)
20 if (i
> 0) /* { dg-bogus "warning" "" { xfail *-*-* } } */