Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-2.C

raw
1 /* { dg-do compile { target c++11 } } */
2 /* { dg-options "-O2 -fdump-tree-cddce1-details -fdump-tree-optimized" } */
3 // { dg-require-effective-target cxa_atexit }
4 /* PR tree-optimization/19661 */
5
6 /* The call to axexit should be not removed as A::~A() as it marked with noipa. */
7
8 struct A {
9 A();
10 ~A();
11 };
12
13 [[gnu::noipa]] A::~A() {}
14
15 void foo () {
16 static A a;
17 }
18
19 /* { dg-final { scan-tree-dump-not "Deleting : (?:__cxxabiv1::__cxa_atexit|__aeabiv1::__aeabi_atexit)" "cddce1" } } */
20 /* { dg-final { scan-tree-dump-times "(?:__cxa_atexit|__aeabi_atexit)" 1 "optimized" } } */
21