This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[libgfortran,committed] Remove use of HAVE_MATH_H in acinclude.m4


Checks for broken isfinite(), isnan() and fpclassify() in libgfortran/ acinclude.m4 include <math.h> conditionaly on HAVE_MATH_H being defined (original patch by Stevel Ellcey, http://gcc.gnu.org/ml/ fortran/2005-09/msg00443.html, okayed by yours truly). Unfortunately, HAVE_MATH_H is never defined, ever. Thus, the tests are done without including <math.h>, and can sometimes give wrong results (one example being powerpc-apple-darwin9.2.0, see comment #28 in PR 32841).

The patch below, committed as rev. 132587 after bootstrap on powerpc- apple-darwin9.2.0, fixes that issue. (And that's my first 2008 library patch!)

FX



2008-02-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>

        PR libfortran/32841
        * acinclude.m4: Don't use HAVE_MATH_H.
        * configure: Regenerate.


Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 132578) +++ acinclude.m4 (working copy) @@ -204,9 +204,7 @@ libgfor_check_for_broken_isfinite_save_LIBS=$LIBS LIBS="$LIBS -lm" AC_TRY_RUN([ -#ifdef HAVE_MATH_H #include <math.h> -#endif #include <float.h> int main () { @@ -237,9 +235,7 @@ libgfor_check_for_broken_isnan_save_LIBS=$LIBS LIBS="$LIBS -lm" AC_TRY_RUN([ -#ifdef HAVE_MATH_H #include <math.h> -#endif #include <float.h> int main () { @@ -288,9 +284,7 @@ libgfor_check_for_broken_fpclassify_save_LIBS=$LIBS LIBS="$LIBS -lm" AC_TRY_RUN([ -#ifdef HAVE_MATH_H #include <math.h> -#endif #include <float.h> int main () {


-- François-Xavier Coudert http://www.homepages.ucl.ac.uk/~uccafco/


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