]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Replace stacktrace effective target with feature test
authorJonathan Wakely <jwakely@redhat.com>
Fri, 22 Mar 2024 22:26:10 +0000 (22:26 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 26 Mar 2024 11:32:55 +0000 (11:32 +0000)
Rmove the dejagnu code for checking whether std::stacktrace is supported
and just use the new dg-require-cpp-feature-test directive to check for
__cpp_lib_stacktrace instead.

libstdc++-v3/ChangeLog:

* testsuite/19_diagnostics/stacktrace/current.cc: Check for
__cpp_lib_stacktrace instead of check for stacktrace ET.
* testsuite/19_diagnostics/stacktrace/entry.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/hash.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/synopsis.cc: Likewise.
* testsuite/19_diagnostics/stacktrace/version.cc: Likewise.
* testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
Remove.

libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc
libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc
libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc
libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc
libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc
libstdc++-v3/testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc
libstdc++-v3/testsuite/lib/libstdc++.exp

index a27836d27af2f52a31716abaee3569a546e207e8..b1af5f74fb2f5902d199a3cb0f167d9dd219d6a8 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 
 #include <stacktrace>
 #include <memory>
index ab016d5640014f984c27ef74a44de86bd6bac49d..bb348ebef8fd8fabe85ed2351e92c54c7abd6f9b 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 
 #include <stacktrace>
 #include "testsuite_hooks.h"
index 21705098ff0f923a600fbffacb8e9ba28555d682..2176596ae5c90868bb99f87334fc91f1eb835871 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 
 #include <stacktrace>
 #include <testsuite_allocator.h>
index 67f1e0cebaf91bccbb23189ef2699876adf6da6d..e27aea1f5089f7b599925e2fda5145835a3c0cd1 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 // { dg-add-options no_pch }
 
 #include <stacktrace>
index 5dfa76951df55ce8b1c48ebbf32d2e26ec629e89..070c4157471c2bec29d5f20fa8549dc11aba9878 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-lstdc++exp" }
 // { dg-do run { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 
 #include <stacktrace>
 #include "testsuite_allocator.h"
index 9e775b86ac979e297e97f4319c03ee0fb230bca1..b99d382ec2676c3c59de95f72513b7cf17115836 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 // { dg-require-normal-namespace "" }
 // { dg-add-options no_pch }
 
index 21c2d48b7b50f5ec95937f0d841a98ab3f8f8fc0..1fc7722a6f406c564dfedc53c8f1198d00061088 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do preprocess { target c++23 } }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 // { dg-add-options no_pch }
 
 #include <version>
index 43a82fb120101376e58eddeddbd534786fac13fb..2f7238c590c3f910b679f8e0192958f099b76a6e 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run { xfail *-*-* } }
 // { dg-options "-D_GLIBCXX_DEBUG_BACKTRACE -lstdc++exp" }
-// { dg-require-effective-target stacktrace }
+// { dg-require-cpp-feature-test __cpp_lib_stacktrace }
 
 #include <debug/vector>
 #include <debug/checks.h>
index 2b31c9508269d81ab94991ae53759c2945ae8412..67a63f5b5f39f9003e62e9417a22a488493f1d34 100644 (file)
@@ -1570,14 +1570,6 @@ proc check_effective_target_std_allocator_new { } {
     }]
 }
 
-# Return 1 if libstdc++ was built as --enable-libstdcxx-backtrace
-proc check_effective_target_stacktrace { } {
-    return [check_v3_target_prop_cached et_stacktrace {
-       set cond "_GLIBCXX_HAVE_STACKTRACE && _GLIBCXX_HOSTED"
-       return [v3_check_preprocessor_condition stacktrace $cond]
-    }]
-}
-
 # Return 1 if RTTI is enabled by the current test flags.
 proc check_effective_target_rtti { } {
     return [check_v3_target_prop_cached et_rtti {