diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cleanup-7.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cleanup-7.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cleanup-7.c b/gcc/testsuite/gcc.dg/cleanup-7.c new file mode 100644 index 000000000..eae3d5298 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cleanup-7.c @@ -0,0 +1,22 @@ +/* { dg-do run } */ +/* { dg-options "" } */ +/* Verify that the search for function happens in the proper scope. */ + +extern void exit(int); +extern void abort(void); + +int main() +{ + auto void xyzzy(void *p __attribute__((unused))) + { + exit (0); + } + + auto void doit () + { + int x __attribute__((cleanup (xyzzy))); + } + + doit (); + abort (); +} |