repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Warn pointer to signed integer cast for ilp32
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
Wstrict-overflow-14.c
blob
6f3c5a24fd15018f0b9fcf446fcf3d89313a555a
1
/* { dg-do compile } */
2
/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=4" } */
3
4
/* Source: Ian Lance Taylor. */
5
6
int
7
foo
(
int
j
)
8
{
9
int
i
;
10
int
sum
=
0
;
11
12
for
(
i
=
1
;
i
<
j
;
i
+=
i
)
13
sum
+=
i
/
16
;
/* { dg-warning "assuming signed overflow does not occur" "" } */
14
return
sum
;
15
}