* lib/target-supports.exp
authorJoseph Myers <joseph@codesourcery.com>
Wed, 18 Jun 2008 21:14:28 +0000 (22:14 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 18 Jun 2008 21:14:28 +0000 (22:14 +0100)
(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
gcc/testsuite/gcc.dg/tree-ssa/loop-19.c
gcc/testsuite/lib/target-supports.exp

index bf4c5b9318598206fbb2f037e2d31ca3be89a784..4e3fc31b4cd5e56c180f9086e39ce49dd7ebc4a4 100644 (file)
@@ -1,3 +1,10 @@
+2008-06-18  Joseph Myers  <joseph@codesourcery.com>
+
+       * 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  <jh@suse.cz>
 
        * gcc.dg/weak/weak-2.c: We no longer complain about incompatibilty.
index 748c6e8143499852a1adf34a25a6a747268670f3..cae91bac4babb5083a3b51974a35e53aecd12691 100644 (file)
@@ -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" } */
 
index 30804858a42b170e1e8ea580b6c6cc0dce821e2b..5986c7bad4b1ee0b3cf1a820a02e4343e2a38608 100644 (file)
@@ -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 { } {