[gcc(refs/users/aoliva/heads/testme)] [libstdc++] [testsuite] require cmath for c++23 cmath tests
Alexandre Oliva
aoliva@gcc.gnu.org
Tue Jun 11 23:49:13 GMT 2024
https://gcc.gnu.org/g:bed26758b722c27f22be833546b0ef9a9793dfe2
commit bed26758b722c27f22be833546b0ef9a9793dfe2
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Jun 11 20:25:33 2024 -0300
[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_std_c++23.cc:
Likewise.
Diff:
---
libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc | 1 +
libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc | 1 +
libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc | 1 +
3 files changed, 3 insertions(+)
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 0e3d112fe2e8..3c2377fd6987 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 @@
// <http://www.gnu.org/licenses/>.
// { dg-do link { target c++23 } }
+// { dg-require-cmath "" }
#include <stdfloat>
#include <cmath>
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 000cebf364aa..ea68ac5da755 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 @@
// <http://www.gnu.org/licenses/>.
// { dg-do link { target c++23 } }
+// { dg-require-cmath "" }
#include <stdfloat>
#include <cmath>
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 7d7e10bd8aea..91767d22cc3f 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 @@
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++23 } }
+// { dg-require-cmath "" }
#include <stdfloat>
#include <cmath>
More information about the Gcc-cvs
mailing list