From: Alexandre Oliva Date: Wed, 12 Jun 2024 22:48:06 +0000 (-0300) Subject: [libstdc++] [testsuite] require cmath for c++23 cmath tests X-Git-Tag: basepoints/gcc-16~8327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5288935d30c4615cce664ca8fba65eecf05c326f;p=thirdparty%2Fgcc.git [libstdc++] [testsuite] require cmath for c++23 cmath tests Some c++23 tests fail on targets that don't satisfy dg-require-cmath, because referenced math functions don't get declared in std. Add the missing requirement. for libstdc++-v3/ChangeLog * testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc: Require cmath. * testsuite/26_numerics/headers/cmath/functions_std_c++23.cc: Likewise. * testsuite/26_numerics/headers/cmath/nextafter_c++23.cc: Likewise. --- diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc index 0e3d112fe2e..3c2377fd698 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc @@ -16,6 +16,7 @@ // . // { dg-do link { target c++23 } } +// { dg-require-cmath "" } #include #include diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc index 000cebf364a..ea68ac5da75 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc @@ -16,6 +16,7 @@ // . // { dg-do link { target c++23 } } +// { dg-require-cmath "" } #include #include diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc index 7d7e10bd8ae..91767d22cc3 100644 --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc @@ -16,6 +16,7 @@ // . // { dg-do run { target c++23 } } +// { dg-require-cmath "" } #include #include