1/* { dg-do run } */ 2/* { dg-options "" } */ 3/* Verify that cleanup works in the most basic of ways. */ 4 5extern "C" void exit(int); 6extern "C" void abort(void); 7 8static void handler(void *p __attribute__((unused))) 9{ 10 exit (0); 11} 12 13static void doit(void) 14{ 15 int x __attribute__((cleanup (handler))); 16} 17 18int main() 19{ 20 doit (); 21 abort (); 22} 23