/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-cddce1-details -fdump-tree-optimized" } */
// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
/* PR tree-optimization/19661 */
/* The call to axexit should be removed as A::~A() is a pure/const function call
/* { dg-do compile { target c++11 } } */
/* { dg-options "-O2 -fdump-tree-cddce1-details -fdump-tree-optimized" } */
// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
/* PR tree-optimization/19661 */
/* The call to axexit should be not removed as A::~A() as it marked with noipa. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-cddce1-details -fdump-tree-optimized" } */
// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
/* PR tree-optimization/19661 */
/* We should not remove the call to atexit as A::~A is unknown. */
/* { dg-do compile { target c++11 } } */
/* { dg-options "-O2 -fdump-tree-cddce1-details -fdump-tree-optimized -w" } */
// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
/* PR tree-optimization/19661 */
/* The call to axexit should be removed as A::~A() is a pure/const function call
/* { dg-do compile { target c++20 } } */
/* { dg-options "-O2 -fdump-tree-dce2-details -fdump-tree-optimized" } */
// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
/* PR tree-optimization/19661 */
/* The call to axexit should be removed as constant_init::~constant_init is a pure/const function call
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fdump-tree-cddce1-details -fdump-tree-optimized -fPIC" } */
// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
/* This test is not appropriate for targets where non-weak functions defined
in the TU always bind locally; see PR114982. */
/* { dg-skip-if "PR114982" { *-*-darwin* } } */