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 inline-asm/84742
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr56982.c
blob
0fa9c8ab4ba82ae53cb20321c3bdad5f162ddd08
1
/* { dg-require-effective-target indirect_jumps } */
2
#include <setjmp.h>
3
4
extern
void
abort
(
void
);
5
extern
void
exit
(
int
);
6
7
static jmp_buf
env
;
8
9
void
baz
(
void
)
10
{
11
__asm__
volatile
(
""
: : :
"memory"
);
12
}
13
14
static
inline
int
g
(
int
x
)
15
{
16
if
(
x
)
17
{
18
baz
();
19
return
0
;
20
}
21
else
22
{
23
baz
();
24
return
1
;
25
}
26
}
27
28
int
f
(
int
*
e
)
29
{
30
if
(*
e
)
31
return
1
;
32
33
int
x
=
setjmp
(
env
);
34
int
n
=
g
(
x
);
35
if
(
n
==
0
)
36
exit
(
0
);
37
if
(
x
)
38
abort
();
39
longjmp
(
env
,
42
);
40
}
41
42
int
main
(
int
argc
,
char
**
argv
)
43
{
44
int
v
=
0
;
45
return
f
(&
v
);
46
}