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
2017-11-15 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
cleanup-2.c
blob
2c798023ccbd96b06485fd5fb46a901c21224d6a
1
/* { dg-do run } */
2
/* { dg-options "" } */
3
/* Verify that cleanup works in the most basic of ways. */
4
5
extern
void
exit
(
int
);
6
extern
void
abort
(
void
);
7
8
static void
handler
(
void
*
p
__attribute__
((
unused
)))
9
{
10
exit
(
0
);
11
}
12
13
static void
doit
(
void
)
14
{
15
int
x
__attribute__
((
cleanup
(
handler
)));
16
}
17
18
int
main
()
19
{
20
doit
();
21
abort
();
22
}