This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.24-597-ge082ac7


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  e082ac7533e75d3dbe5b949b09e843a65348d43b (commit)
      from  f39cd196c63fe3fe7a93168aa1c1e4e65b2fb2e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e082ac7533e75d3dbe5b949b09e843a65348d43b

commit e082ac7533e75d3dbe5b949b09e843a65348d43b
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jan 2 20:47:17 2017 +0000

    Fix math/test-nearbyint-except for no-exceptions configurations.
    
    The test math/test-nearbyint-except conditions some of its tests on an
    EXCEPTION_TESTS call, not not all that need such a condition.  This
    patch fixes it to use such a conditional for all its tests and to
    return 77 (UNSUPPORTED) if none of the floating-point types tested
    support exceptions.
    
    Tested for mips64 soft float (where the test previously failed and is
    now UNSUPPORTED); also tested for x86_64 to make sure the test still
    PASSes in exceptions-supported cases.
    
    	* math/test-nearbyint-except.c: Include <stdbool.h>.
    	(any_supported): New variable.
    	(TEST_FUNC): Return early if !EXCEPTION_TESTS (FLOAT).  Otherwise
    	set any_supported.
    	(do_test): Return 77 if no floating-point type supported
    	exceptions.

diff --git a/ChangeLog b/ChangeLog
index e6b850c..b3b6df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-01-02  Joseph Myers  <joseph@codesourcery.com>
 
+	* math/test-nearbyint-except.c: Include <stdbool.h>.
+	(any_supported): New variable.
+	(TEST_FUNC): Return early if !EXCEPTION_TESTS (FLOAT).  Otherwise
+	set any_supported.
+	(do_test): Return 77 if no floating-point type supported
+	exceptions.
+
 	* sysdeps/mips/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD): Do not
 	condition on [__mips_hard_float].
 
diff --git a/math/test-nearbyint-except.c b/math/test-nearbyint-except.c
index 61b999f..e33846c 100644
--- a/math/test-nearbyint-except.c
+++ b/math/test-nearbyint-except.c
@@ -18,6 +18,7 @@
 
 #include <fenv.h>
 #include <math.h>
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <math-tests.h>
@@ -26,11 +27,16 @@
 # define FE_INVALID 0
 #endif
 
+static bool any_supported = false;
+
 #define TEST_FUNC(NAME, FLOAT, SUFFIX)					\
 static int								\
 NAME (void)								\
 {									\
   int result = 0;							\
+  if (!EXCEPTION_TESTS (FLOAT))						\
+    return 0;								\
+  any_supported = true;							\
   volatile FLOAT a, b __attribute__ ((unused));				\
   a = 1.0;								\
   /* nearbyint must not clear already-raised exceptions.  */		\
@@ -44,7 +50,7 @@ NAME (void)								\
       result = 1;							\
     }									\
   /* But it mustn't lose exceptions from sNaN arguments.  */		\
-  if (SNAN_TESTS (FLOAT) && EXCEPTION_TESTS (FLOAT))			\
+  if (SNAN_TESTS (FLOAT))						\
     {									\
       static volatile FLOAT snan = __builtin_nans ## SUFFIX ("");	\
       volatile FLOAT c __attribute__ ((unused));			\
@@ -75,6 +81,8 @@ do_test (void)
 #ifndef NO_LONG_DOUBLE
   result |= ldouble_test ();
 #endif
+  if (!any_supported)
+    return 77;
   return result;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                    |    7 +++++++
 math/test-nearbyint-except.c |   10 +++++++++-
 2 files changed, 16 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]