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
/
pr49161.c
blob
cc822dae8c3cde3bf0b235da1c8b191a5e271d3f
1
/* PR tree-optimization/49161 */
2
3
extern
void
abort
(
void
);
4
5
int
c
;
6
7
__attribute__
((
noinline
,
noclone
))
void
8
bar
(
int
x
)
9
{
10
if
(
x
!=
c
++)
11
abort
();
12
}
13
14
__attribute__
((
noinline
,
noclone
))
void
15
foo
(
int
x
)
16
{
17
switch
(
x
)
18
{
19
case
3
:
goto
l1
;
20
case
4
:
goto
l2
;
21
case
6
:
goto
l3
;
22
default
:
return
;
23
}
24
l1
:
25
goto
l4
;
26
l2
:
27
goto
l4
;
28
l3
:
29
bar
(-
1
);
30
l4
:
31
bar
(
0
);
32
if
(
x
!=
4
)
33
bar
(
1
);
34
if
(
x
!=
3
)
35
bar
(-
1
);
36
bar
(
2
);
37
}
38
39
int
40
main
()
41
{
42
foo
(
3
);
43
if
(
c
!=
3
)
44
abort
();
45
return
0
;
46
}