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
PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr55137.c
blob
80bc973f7f8dc04a3304819e2daf3c2aa255f335
1
/* PR c++/55137 */
2
3
extern
void
abort
(
void
);
4
5
int
6
foo
(
unsigned int
x
)
7
{
8
return
((
int
) (
x
+
1U
) +
1
) < (
int
)
x
;
9
}
10
11
int
12
bar
(
unsigned int
x
)
13
{
14
return
(
int
) (
x
+
1U
) +
1
;
15
}
16
17
int
18
baz
(
unsigned int
x
)
19
{
20
return
x
+
1U
;
21
}
22
23
int
24
main
()
25
{
26
if
(
foo
(
__INT_MAX__
) != (
bar
(
__INT_MAX__
) <
__INT_MAX__
)
27
||
foo
(
__INT_MAX__
) != ((
int
)
baz
(
__INT_MAX__
) +
1
<
__INT_MAX__
))
28
abort
();
29
return
0
;
30
}