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
2014-08-04 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
non-local-goto-1.c
blob
2bace076fad3b4fb39deb389bb7685cb853e7304
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
extern
void
abort
(
void
);
5
6
int
global
;
7
8
static
foo
(
void
)
__attribute__
((
noinline
));
9
10
static
foo
(
void
)
11
{
12
global
=
1
;
13
}
14
15
static
bar
(
void
)
16
{
17
foo
();
18
}
19
20
int
execute
(
int
cmd
)
21
{
22
__label__ start
;
23
24
void
raise
(
void
)
25
{
26
goto
start
;
27
}
28
29
int
last
;
30
31
bar
();
32
33
last
=
0
;
34
35
start
:
36
37
if
(
last
==
0
)
38
while
(
1
)
39
{
40
last
=
1
;
41
raise
();
42
}
43
44
if
(
last
==
0
)
45
return
0
;
46
else
47
return
cmd
;
48
}
49
50
int
main
(
void
)
51
{
52
if
(
execute
(
1
) ==
0
)
53
abort
();
54
55
return
0
;
56
}