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.28.9000-6-gf6dcefb


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  f6dcefbe607e7c190388c11db0a80a80e6ce9686 (commit)
      from  fa67ba06ee07845a2bac34afa609ee2bbb1e017e (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=f6dcefbe607e7c190388c11db0a80a80e6ce9686

commit f6dcefbe607e7c190388c11db0a80a80e6ce9686
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Aug 1 22:22:00 2018 +0000

    Fix math/test-misc.c for undefined fenv.h macros.
    
    math/test-misc.c contains some code that uses fenv.h macros
    FE_UNDERFLOW, FE_OVERFLOW and FE_UPWARD without being conditional on
    those macros being defined.
    
    That would normally break the build for configurations (typically
    soft-float) not defining those macros.  However, the code in question
    is inside LDBL_MANT_DIG > DBL_MANT_DIG conditionals.  And, while we
    have configurations lacking rounding mode and exception support where
    LDBL_MANT_DIG > DBL_MANT_DIG (soft-float MIPS64 and RISC-V), those
    configurations currently define the fenv.h macros in question even for
    soft-float.
    
    There may be some case for defining those macros in cases where a
    soft-float compilation could use a hard-float libm (where both
    soft-float and hard-float can use the same ABI, as on ARM and RISC-V,
    for example).  But MIPS is not such a case - the hard-float and
    soft-float ABIs are incompatible - and thus I am testing a patch to
    stop defining those macros for soft-float MIPS (motivated by reducing
    the extent to which architectures need their own definitions of
    math-tests.h macros - if lack of rounding mode / exception support can
    be determined by the lack of macros in fenv.h, that avoids the need
    for math-tests.h to declare that lack as well).  Introducing a case of
    LDBL_MANT_DIG > DBL_MANT_DIG without these macros defined shows up the
    problem with math/test-misc.c.  This patch then fixes that problem by
    adding appropriate conditionals.
    
    Tested for MIPS64 in conjunction with changes to stop defining the
    macros in question in bits/fenv.h for soft-float.
    
    	* math/test-misc.c (do_test) [LDBL_MANT_DIG > DBL_MANT_DIG]: Make
    	code using FE_UNDERFLOW conditional on [FE_UNDERFLOW], code using
    	FE_OVERFLOW conditional on [FE_OVERFLOW] and code using FE_UPWARD
    	conditional on [FE_UPWARD].

diff --git a/ChangeLog b/ChangeLog
index dc3a445..d8994e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-01  Joseph Myers  <joseph@codesourcery.com>
+
+	* math/test-misc.c (do_test) [LDBL_MANT_DIG > DBL_MANT_DIG]: Make
+	code using FE_UNDERFLOW conditional on [FE_UNDERFLOW], code using
+	FE_OVERFLOW conditional on [FE_OVERFLOW] and code using FE_UPWARD
+	conditional on [FE_UPWARD].
+
 2018-08-01  Paul Eggert  <eggert@cs.ucla.edu>
 
 	regex: fix memory leak in Gnulib
diff --git a/math/test-misc.c b/math/test-misc.c
index c5cfb34..963e1e7 100644
--- a/math/test-misc.c
+++ b/math/test-misc.c
@@ -976,11 +976,13 @@ do_test (void)
 	puts ("scalbl (LDBL_MIN, 2147483647) returns -Inf");
 	result = 1;
       }
+# ifdef FE_UNDERFLOW
     else if (fetestexcept (FE_UNDERFLOW))
       {
 	puts ("scalbl (LDBL_MIN, 2147483647) raises underflow exception");
 	result = 1;
       }
+# endif
 
     feclearexcept (FE_ALL_EXCEPT);
     r = scalbl (LDBL_MAX, -2147483647);
@@ -994,11 +996,13 @@ do_test (void)
 	puts ("scalbl (LDBL_MAX, -2147483647) returns -Inf");
 	result = 1;
       }
+# ifdef FE_OVERFLOW
     else if (fetestexcept (FE_OVERFLOW))
       {
 	puts ("scalbl (LDBL_MAX, -2147483647) raises overflow exception");
 	result = 1;
       }
+# endif
   }
 #endif
 
@@ -1178,6 +1182,7 @@ do_test (void)
 	}
     }
 
+#  ifdef FE_UPWARD
   volatile long double ld7 = nextafterl (0.0L, 1.0L);
   volatile double d7;
   (void) &ld7;
@@ -1195,6 +1200,7 @@ do_test (void)
       else
 	puts ("ignoring this failure");
     }
+#  endif
 # endif
 #endif
 

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

Summary of changes:
 ChangeLog        |    7 +++++++
 math/test-misc.c |    6 ++++++
 2 files changed, 13 insertions(+), 0 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]