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