diff mbox

[testsuite] : Disable gcc.dg/pr61441 where issignaling is not available

Message ID CAFULd4bB3836p9Qvw2qA5iRP+mekSsxk0UqYUU8HpjYZ1sgEjA@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Jan. 14, 2016, 2:45 p.m. UTC
2016-01-14  Uros Bizjak  <ubizjak@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.

Comments

Jeff Law Jan. 14, 2016, 5:34 p.m. UTC | #1
On 01/14/2016 07:45 AM, Uros Bizjak wrote:
> 2016-01-14  Uros Bizjak  <ubizjak@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?
OK.
jeff
diff mbox

Patch

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)));