OSDN Git Service

* decl.c (get_atexit_fn_ptr_type): New function.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / init / cleanup3.C
1 // Check that on targets with "__cxa_atexit" we use destructors,
2 // rather than cleanup functions, to destroy objects with static
3 // storage duration.
4
5 // { dg-require-effective-target "cxa_atexit" }
6 // Cleanup functions generated by G++ have the "_tcf" prefix.
7 // { dg-final { scan-assembler-not "_tcf" } }
8
9 struct S { 
10   ~S();
11 };
12
13 struct T { 
14   S s;
15 };
16
17 S s;
18 T t;
19
20 void f() {
21   static S s;
22 }