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
/
20071216-1.c
blob
a337b773af8f26065d03e1f94808f8d6a4e95a2c
1
/* PR rtl-optimization/34490 */
2
3
extern
void
abort
(
void
);
4
5
static int
x
;
6
7
int
8
__attribute__
((
noinline
))
9
bar
(
void
)
10
{
11
return
x
;
12
}
13
14
int
15
foo
(
void
)
16
{
17
long int
b
=
bar
();
18
if
((
unsigned long
)
b
< -
4095L
)
19
return
b
;
20
if
(-
b
!=
38
)
21
b
= -
2
;
22
return
b
+
1
;
23
}
24
25
int
26
main
(
void
)
27
{
28
x
=
26
;
29
if
(
foo
() !=
26
)
30
abort
();
31
x
= -
39
;
32
if
(
foo
() != -
1
)
33
abort
();
34
x
= -
38
;
35
if
(
foo
() != -
37
)
36
abort
();
37
return
0
;
38
}