blob: ef805b56d25292aaa8744b07d10a6d9d078ee837 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* { 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;
}
|