Sign in
gnu
/
gcc
/
99b1021d21e5812ed01221d8fca8e8a32488a934
/
.
/
gcc
/
testsuite
/
gcc.dg
/
Wstrict-overflow-26.c
blob: ef805b56d25292aaa8744b07d10a6d9d078ee837 [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-overflow" } */
int
f
(
int
i
,
int
j
)
{
unsigned
int
c
=
0
;
if
(
i
<
j
)
{
unsigned
int
n
=
j
-
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
n
;
i
++)
/* { dg-bogus "signed overflow" } */
c
++;
}
return
c
;
}