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
/
920721-4.c
blob
805918b2aa3dcd4a0ddcc765a5e2fd1772a8538b
1
/* { dg-require-effective-target label_values } */
2
3
int
try
(
int
num
) {
4
__label__ lab1
,
lab2
,
lab3
,
lab4
,
lab5
,
lab6
,
default_lab
;
5
6
void
*
do_switch
(
int
num
) {
7
switch
(
num
) {
8
case
1
:
9
return
&&
lab1
;
10
case
2
:
11
return
&&
lab2
;
12
case
3
:
13
return
&&
lab3
;
14
case
4
:
15
return
&&
lab4
;
16
case
5
:
17
return
&&
lab5
;
18
case
6
:
19
return
&&
lab6
;
20
default
:
21
return
&&
default_lab
;
22
}
23
}
24
25
goto
*
do_switch
(
num
);
26
27
lab1
:
28
return
1
;
29
30
lab2
:
31
return
2
;
32
33
lab3
:
34
return
3
;
35
36
lab4
:
37
return
4
;
38
39
lab5
:
40
return
5
;
41
42
lab6
:
43
return
6
;
44
45
default_lab
:
46
return
-
1
;
47
}
48
49
main
()
50
{
51
int
i
;
52
for
(
i
=
1
;
i
<=
6
;
i
++)
53
{
54
if
(
try
(
i
) !=
i
)
55
abort
();
56
}
57
exit
(
0
);
58
}