aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2016-12-12 15:47:47 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2016-12-12 15:47:47 +0000
commit39c429372b27f6bedfb2459c7695531c1a37c0ea (patch)
tree4cbd231b103ac0ad3b9ead75370854968e39c7fe /gcc
parent1c43384234e73d0c88fccaf58c298db5e29540ce (diff)
downloadgcc-39c429372b27f6bedfb2459c7695531c1a37c0ea.zip
gcc-39c429372b27f6bedfb2459c7695531c1a37c0ea.tar.gz
gcc-39c429372b27f6bedfb2459c7695531c1a37c0ea.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/lib/target-supports.exp26
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 588c51b..35db819 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 0fc0baf..c3110dc 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -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 {