diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-03-22 22:26:10 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2024-03-26 11:32:55 +0000 |
commit | 217e778a31d68815b029f5110825cd36caefd908 (patch) | |
tree | a5eb2ae6e48bdc7a7f0854b3effffb962c6742d0 /libstdc++-v3 | |
parent | 4a3a1b6b75f921d35bbfef26619e7b5cece3fcf0 (diff) | |
download | gcc-217e778a31d68815b029f5110825cd36caefd908.zip gcc-217e778a31d68815b029f5110825cd36caefd908.tar.gz gcc-217e778a31d68815b029f5110825cd36caefd908.tar.bz2 |
libstdc++: Replace stacktrace effective target with feature test
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.
Diffstat (limited to 'libstdc++-v3')
9 files changed, 8 insertions, 16 deletions
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc index a27836d..b1af5f7 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc @@ -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> diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc index ab016d56..bb348eb 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc @@ -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" diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc index 2170509..2176596 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc @@ -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> diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc index 67f1e0c..e27aea1 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc @@ -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> diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc index 5dfa769..070c415 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc @@ -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" diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc index 9e775b8..b99d382 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/synopsis.cc @@ -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 } diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc index 21c2d48..1fc7722 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/version.cc @@ -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> diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc index 43a82fb..2f7238c 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc @@ -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> diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 2b31c95..67a63f5 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -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 { |