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
Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
pr26180.c
blob
13c302dea3a3b9ac6d5c6b69d56e31e8269d7251
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
/* { dg-require-effective-target int32plus } */
4
5
void
abort
(
void
);
6
int
bar
(
int
x
,
int
y
)
7
{
8
int
x1
,
y1
;
9
int
x2
,
y2
;
10
unsigned int
x3
,
y3
,
w
;
11
int
z
=
1
;
12
13
x1
= (
x
< (
1
<<
30
));
14
y1
= (
y
< (
1
<<
30
));
15
if
(
x1
)
16
if
(
y1
) {
17
x2
= ((
x
>
0
)? (
x
): -(
x
));
18
y2
= ((
y
>
0
)? (
y
): -(
y
));
19
20
x3
=
x2
;
21
y3
=
y2
;
22
w
=
x3
*
y3
;
23
24
if
(
w
>= (
1
<<
30
)) {
25
z
=
1
;
26
}
else
{
27
z
= -
1
;
28
}
29
}
30
31
return
z
;
32
}
33
34
35
int
main
()
36
{
37
int
x
,
y
,
z
;
38
x
=
536870912
;
/* 2^29 */
39
y
=
2
;
40
z
=
bar
(
x
,
y
);
41
if
(
z
!=
1
)
42
abort
();
43
return
0
;
44
}