[libstdc++][testsuite] XFAIL tests relying on long double-to-string conversions on broken newlib

* lib/target-supports.exp
    (check_effective_target_newlib_broken_long_double_io): New check.
    (check_effective_target_frexpl): Likewise.

    * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
    XFAIL run if newlib_broken_long_double_io.
    * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
    Likewise.
    * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
    Likewise.
    * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
    Likewise.

From-SVN: r243558
This commit is contained in:
Kyrylo Tkachov 2016-12-12 15:47:47 +00:00 committed by Kyrylo Tkachov
parent 1c43384234
commit 39c429372b
8 changed files with 50 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2016-12-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp
(check_effective_target_newlib_broken_long_double_io): New check.
(check_effective_target_frexpl): Likewise.
2016-12-12 Marek Polacek <polacek@redhat.com>
PR middle-end/78716

View File

@ -6765,6 +6765,17 @@ proc check_effective_target_newlib {} {
}]
}
# Some newlib versions don't provide a frexpl and instead depend
# on frexp to implement long double conversions in their printf-like
# functions. This leads to broken results. Detect such versions here.
proc check_effective_target_newlib_broken_long_double_io {} {
if { [is-effective-target newlib] && ![is-effective-target frexpl] } {
return 1
}
return 0
}
# Return true if this is NOT a Bionic target.
proc check_effective_target_non_bionic {} {
@ -7380,6 +7391,21 @@ proc check_effective_target_pow10 { } {
} "-lm" ]
}
# Return 1 if frexpl function exists.
proc check_effective_target_frexpl { } {
return [check_runtime frexpl {
#include <math.h>
int main () {
long double x;
int y;
x = frexpl (5.0, &y);
return 0;
}
} "-lm" ]
}
# Return 1 if issignaling function exists.
proc check_effective_target_issignaling {} {
return [check_runtime issignaling {

View File

@ -1,3 +1,14 @@
2016-12-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
XFAIL run if newlib_broken_long_double_io.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
Likewise.
2016-12-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/filesystem/operations/is_empty.cc:

View File

@ -1,5 +1,6 @@
// { dg-do run { target c++11 } }
// { dg-require-string-conversions "" }
// { dg-xfail-run-if "broken long double IO" { newlib_broken_long_double_io } "*" "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>

View File

@ -1,5 +1,6 @@
// { dg-do run { target c++11 } }
// { dg-require-string-conversions "" }
// { dg-xfail-run-if "broken long double IO" { newlib_broken_long_double_io } "*" "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>

View File

@ -1,5 +1,7 @@
// { dg-do run { target c++11 } }
// { dg-require-string-conversions "" }
// { dg-xfail-run-if "broken long double IO" { newlib_broken_long_double_io } "*" "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
// Copyright (C) 2008-2016 Free Software Foundation, Inc.

View File

@ -1,5 +1,7 @@
// { dg-do run { target c++11 } }
// { dg-require-string-conversions "" }
// { dg-xfail-run-if "broken long double IO" { newlib_broken_long_double_io } "*" "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
// Copyright (C) 2008-2016 Free Software Foundation, Inc.

View File

@ -1,6 +1,7 @@
// { dg-do run { target c++11 } }
// { dg-require-string-conversions "" }
// { dg-xfail-run-if "PR libstdc++/64054" { *-*-solaris* } }
// { dg-xfail-run-if "broken long double IO" { newlib_broken_long_double_io } "*" "" }
// 2014-03-27 Rüdiger Sonderfeld
// test the hexadecimal floating point inserters (facet num_put)