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
gcc/
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr45262.c
blob
72e186bf287fc41d24445d765fc97dc9faf238f8
1
/* PR middle-end/45262 */
2
3
extern
void
abort
(
void
);
4
5
int
6
foo
(
unsigned int
x
)
7
{
8
return
((
int
)
x
<
0
) || ((
int
) (-
x
) <
0
);
9
}
10
11
int
12
bar
(
unsigned int
x
)
13
{
14
return
x
>>
31
|| (-
x
) >>
31
;
15
}
16
17
int
18
main
(
void
)
19
{
20
if
(
foo
(
1
) !=
1
)
21
abort
();
22
if
(
foo
(
0
) !=
0
)
23
abort
();
24
if
(
foo
(-
1
) !=
1
)
25
abort
();
26
if
(
bar
(
1
) !=
1
)
27
abort
();
28
if
(
bar
(
0
) !=
0
)
29
abort
();
30
if
(
bar
(-
1
) !=
1
)
31
abort
();
32
return
0
;
33
}