libstdc++: testsuite: require cmath for nexttowardl

Message ID orv8suefzm.fsf@lxoliva.fsfla.org
State Committed
Commit 540ae3601e1d2403ae5ba27db36ca75cb1e8d055
Headers
Series libstdc++: testsuite: require cmath for nexttowardl |

Commit Message

Alexandre Oliva June 21, 2022, 5:35 a.m. UTC
  nexttowardl is only expected to be available with C99 math, but
20_util/to_chars/long_double.cc uses it unconditionally.

State the cmath requirement in the test.

Regstrapped on x86_64-linux-gnu, also tested with a cross to
aarch64-rtems6.  Ok to install?


for  libstdc++-v3/ChangeLog

	* testsuite/20_util/to_chars/long_double.cc: Require cmath.
---
 .../testsuite/20_util/to_chars/long_double.cc      |    1 +
 1 file changed, 1 insertion(+)
  

Comments

Jonathan Wakely June 21, 2022, 7:37 a.m. UTC | #1
On Tue, 21 Jun 2022 at 06:36, Alexandre Oliva via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
>
> nexttowardl is only expected to be available with C99 math, but
> 20_util/to_chars/long_double.cc uses it unconditionally.
>
> State the cmath requirement in the test.
>
> Regstrapped on x86_64-linux-gnu, also tested with a cross to
> aarch64-rtems6.  Ok to install?

OK, thanks.
  

Patch

diff --git a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
index 94b5b5967d374..0b1c2c2936fdc 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
@@ -36,6 +36,7 @@ 
 
 // { dg-require-effective-target ieee_floats }
 // { dg-require-effective-target size32plus }
+// { dg-require-cmath "" }
 
 #include <charconv>