Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/cleanup-2.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |