summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cleanup-7.c
blob: eae3d52980c13dca6f4ab98da499c6b5e61c0a80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 ();
}