2016-01-14  Uros Bizjak  <ubiz...@gmail.com>

    * lib/target-supports.exp (check_effective_target_issignaling):
    New procedure.
    * gcc.dg/pr61441.c: Require issignaling effective target.

Tested on x86_64-linux-gnu, CentOS 5.11 and Fedora 23.

OK for mainline?

Uros.
diff --git a/gcc/testsuite/gcc.dg/pr61441.c b/gcc/testsuite/gcc.dg/pr61441.c
index 5d642e8..1b0f181 100644
--- a/gcc/testsuite/gcc.dg/pr61441.c
+++ b/gcc/testsuite/gcc.dg/pr61441.c
@@ -1,5 +1,6 @@
 /* { dg-do run { target { *-*-linux* *-*-gnu* } } } */
 /* { dg-options "-O1 -lm -fexcess-precision=standard" } */
+/* { dg-require-effective-target issignaling } */
 
 #define _GNU_SOURCE
 #include <stdio.h>
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 31a4f60..70546f3 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6287,8 +6287,19 @@ proc check_effective_target_pow10 { } {
     } "-lm" ]
 }
 
-# Return 1 if current options generate DFP instructions, 0 otherwise.
+# Return 1 if issignaling function exists.
+proc check_effective_target_issignaling {} {
+    return [check_runtime issignaling {
+       #define _GNU_SOURCE
+       #include <math.h>
+       int main ()
+       {
+         return issignaling (0.0);
+       }
+    } "-lm" ]
+}
 
+# Return 1 if current options generate DFP instructions, 0 otherwise.
 proc check_effective_target_hard_dfp {} {
     return [check_no_messages_and_pattern hard_dfp "!adddd3" assembly {
        typedef float d64 __attribute__((mode(DD)));

Reply via email to