1 /* { dg-do compile } */
2 /* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
4 /* Warn about an overflow when folding i > 0, p->a - p->b can be larger
5 than INT_MAX and thus i can wrap. */
7 struct c
{ unsigned int a
; unsigned int b
; };
8 extern void bar (struct c
*);
15 for (i
= 0; i
< p
->a
- p
->b
; ++i
)
17 /* See PR80511 for the XFAIL. */
18 if (i
> 0) /* { dg-warning "signed overflow" "" { xfail *-*-* } } */