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
2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
stackalign
/
setjmp-3.c
blob
fee0d281ffaef91bb001a4441fdc6e6a61613d49
1
/* { dg-do run } */
2
3
#include <setjmp.h>
4
5
extern
void
abort
(
void
);
6
7
jmp_buf
buf
;
8
9
void
raise0
(
void
)
10
{
11
__builtin_longjmp
(
buf
,
1
);
12
}
13
14
int
execute
(
int
cmd
)
15
{
16
int
last
=
0
;
17
18
if
(
__builtin_setjmp
(
buf
) ==
0
)
19
while
(
1
)
20
{
21
last
=
1
;
22
raise0
();
23
}
24
25
if
(
last
==
0
)
26
return
0
;
27
else
28
return
cmd
;
29
}
30
31
int
main
(
void
)
32
{
33
if
(
execute
(
1
) ==
0
)
34
abort
();
35
36
return
0
;
37
}