diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2017-03-12 01:04:02 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2017-03-12 01:04:02 +0100 |
commit | 3079b92e3438aeaab2f0e60957ec7583d7d13798 (patch) | |
tree | 54a754d038eac5070fa82f715728d297c36120b0 | |
parent | 376d26750172c66d1bacd258d90c2e6a16c2d187 (diff) | |
download | gcc-3079b92e3438aeaab2f0e60957ec7583d7d13798.zip gcc-3079b92e3438aeaab2f0e60957ec7583d7d13798.tar.gz gcc-3079b92e3438aeaab2f0e60957ec7583d7d13798.tar.bz2 |
rs6000, testsuite: Correct the broken_cplxf_arg test
check_effective_target_broken_cplxf_arg is buggy. It actually tests
if passing complex float works, not if it fails. Also, it only runs
the test for target powerpc64-linux, but we are biarch, so it should
be powerpc*-linux.
This also changes the early-out conditions to be separate, because
the big combined condition was hard to follow.
This fixes the libstdc++ tests:
Running target unix/-m64
XPASS: 26_numerics/complex/13450.cc execution test
XPASS: 26_numerics/complex/pow.cc execution test
XPASS: 26_numerics/complex/value_operations/1.cc execution test
which were the last failing libstdc++ tests on BE.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_broken_cplxf_arg):
Fix test. Make early-out condition return early. Correct comments.
From-SVN: r246072
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 52 |
2 files changed, 30 insertions, 27 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5607171..c25c69f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-11 Segher Boessenkool <segher@kernel.crashing.org> + + * lib/target-supports.exp (check_effective_target_broken_cplxf_arg): + Fix test. Make early-out condition return early. Correct comments. + 2017-03-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/78854 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 43e497b..152b7d9 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2210,36 +2210,34 @@ proc check_effective_target_powerpc64 { } { # GCC 3.4.0 for powerpc64-*-linux* included an ABI fix for passing # complex float arguments. This affects gfortran tests that call cabsf -# in libm built by an earlier compiler. Return 1 if libm uses the same -# argument passing as the compiler under test, 0 otherwise. -# -# When the target name changes, replace the cached result. +# in libm built by an earlier compiler. Return 0 if libm uses the same +# argument passing as the compiler under test, 1 otherwise. proc check_effective_target_broken_cplxf_arg { } { + # Skip the work for targets known not to be affected. + if { ![istarget powerpc*-*-linux*] || ![is-effective-target lp64] } { + return 0 + } + return [check_cached_effective_target broken_cplxf_arg { - # Skip the work for targets known not to be affected. - if { ![istarget powerpc64-*-linux*] } { - expr 0 - } elseif { ![is-effective-target lp64] } { - expr 0 - } else { - check_runtime_nocache broken_cplxf_arg { - #include <complex.h> - extern void abort (void); - float fabsf (float); - float cabsf (_Complex float); - int main () - { - _Complex float cf; - float f; - cf = 3 + 4.0fi; - f = cabsf (cf); - if (fabsf (f - 5.0) > 0.0001) - abort (); - return 0; - } - } "-lm" - } + check_runtime_nocache broken_cplxf_arg { + #include <complex.h> + extern void abort (void); + float fabsf (float); + float cabsf (_Complex float); + int main () + { + _Complex float cf; + float f; + cf = 3 + 4.0fi; + f = cabsf (cf); + if (fabsf (f - 5.0) > 0.0001) + /* Yes, it's broken. */ + return 0; + /* All fine, not broken. */ + return 1; + } + } "-lm" }] } |