5 extern void foo_clean(void* x
);
6 extern void bar_clean(void* x
);
7 extern void register_foo_local(int* x
);
8 extern void register_bar_local(int* x
);
9 extern void done_foo();
10 extern void done_bar();
14 static int* foo_x
= NULL
;
15 void register_foo_local(int* x
)
20 static int* bar_x
= NULL
;
21 void register_bar_local(int* x
)
26 static bool foo_clean_called
= false;
27 void foo_clean(void* x
)
31 if ( foo_x
!= (int*)x
)
33 foo_clean_called
= true;
36 static bool bar_clean_called
= false;
37 void bar_clean(void* x
)
41 if ( bar_x
!= (int*)x
)
43 bar_clean_called
= true;
57 // foo() is in gcc_personality_test.c and calls bar() which
58 // calls done_bar() which throws an exception.
59 // main() will catch the exception and verify that the cleanup
60 // routines for foo() and bar() were called by the personality
69 if ( !foo_clean_called
)
71 if ( !bar_clean_called
)