From 1b811175cee0c0e6203416029071f260cf0e8e23 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 18 Jun 2008 22:14:28 +0100 Subject: [PATCH] * lib/target-supports.exp (check_effective_target_powerpc_hard_double): New. * gcc.dg/tree-ssa/loop-19.c: Use powerpc_hard_double instead of powerpc*-*-*. From-SVN: r136914 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.dg/tree-ssa/loop-19.c | 2 +- gcc/testsuite/lib/target-supports.exp | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf4c5b93185..4e3fc31b4cd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-06-18 Joseph Myers + + * lib/target-supports.exp + (check_effective_target_powerpc_hard_double): New. + * gcc.dg/tree-ssa/loop-19.c: Use powerpc_hard_double instead of + powerpc*-*-*. + 2008-06-16 Jan Hubicka * gcc.dg/weak/weak-2.c: We no longer complain about incompatibilty. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c index 748c6e81434..cae91bac4ba 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c @@ -4,7 +4,7 @@ The testcase comes from PR 29256 (and originally, the stream benchmark). */ -/* { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-*} } */ +/* { dg-do compile { target { i?86-*-* || { x86_64-*-* || powerpc_hard_double } } } } */ /* { dg-require-effective-target nonpic } */ /* { dg-options "-O3 -fdump-tree-final_cleanup" } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 30804858a42..5986c7bad4b 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1277,6 +1277,24 @@ proc check_effective_target_powerpc_fprs { } { } } +# Return 1 if this is a PowerPC target with hardware double-precision +# floating point. + +proc check_effective_target_powerpc_hard_double { } { + if { [istarget powerpc*-*-*] + || [istarget rs6000-*-*] } { + return [check_no_compiler_messages powerpc_hard_double object { + #ifdef _SOFT_DOUBLE + #error soft double + #else + int dummy; + #endif + }] + } else { + return 0 + } +} + # Return 1 if this is a PowerPC target supporting -maltivec. proc check_effective_target_powerpc_altivec_ok { } { -- 2.30.2