// Check that on targets with "__cxa_atexit" we use destructors, | |
// rather than cleanup functions, to destroy objects with static | |
// storage duration. | |
// { dg-require-effective-target "cxa_atexit" } | |
// Cleanup functions generated by G++ have the "_tcf" prefix. | |
// { dg-final { scan-assembler-not "_tcf" } } | |
struct S { | |
~S(); | |
}; | |
struct T { | |
S s; | |
}; | |
S s; | |
T t; | |
void f() { | |
static S s; | |
} |