]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: enable use of cxa_atexit on tree-ssa cxa_atexit tests
authorAlexandre Oliva <oliva@adacore.com>
Wed, 21 Jan 2026 03:30:10 +0000 (00:30 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Wed, 21 Jan 2026 03:30:10 +0000 (00:30 -0300)
The expected cxa_atexit calls and optimizations won't take place on
targets that don't have -fuse-cxa-atexit enabled by default.  Enabling
it explicitly is enough to meet the expectations of the cxa_atexit
tests.

for  gcc/testsuite/ChangeLog

* g++.dg/tree-ssa/cxa_atexit-1.C: Enable -fuse-cxa-atexit.
* g++.dg/tree-ssa/cxa_atexit-2.C: Likewise.
* g++.dg/tree-ssa/cxa_atexit-3.C: Likewise.
* g++.dg/tree-ssa/cxa_atexit-4.C: Likewise.
* g++.dg/tree-ssa/cxa_atexit-5.C: Likewise.
* g++.dg/tree-ssa/cxa_atexit-6.C: Likewise.

gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-1.C
gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-2.C
gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-3.C
gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-4.C
gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-5.C
gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-6.C

index 82ff3d2b7783881d060a63c2b7e3019ee2bfaf37..2c725402c7da21b326ba3862ff4ebe700a156726 100644 (file)
@@ -1,6 +1,7 @@
 /* { 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
index 726b6d7f1561aa9f6eea30c7650e83bf92092462..6a8c3de84870c955fe19ed3bfe3463a5b17d43fe 100644 (file)
@@ -1,6 +1,7 @@
 /* { 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.  */
index 42cc7ccb11bafdff0fc924ce9de094f215da28ed..cf0f086ca3b91094a1fd427f2cf31ec34876dd64 100644 (file)
@@ -1,6 +1,7 @@
 /* { 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.  */
index 591c1c0552a193cf7acd7ac4a977cd885c5d6d04..18467ed9b6fb306c57ec529918616e146b112676 100644 (file)
@@ -1,6 +1,7 @@
 /* { 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
index e59f70c1ed4aaef66989ed8060c5a682a5948e1e..c37cd353a09c164b59bf4da47d496a8e252f3922 100644 (file)
@@ -1,6 +1,7 @@
 /* { 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
index e22036067dd4f7fb194c2bc5aadf9b571cb98f51..cbdfe723afb900c91770be5c05d630e2a5d60534 100644 (file)
@@ -2,6 +2,7 @@
 /* { 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* } } */