From 3b9e41effd7bae778c0e40c31aa9f72b7b725d83 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 20 Jan 2019 21:19:41 +0100 Subject: [PATCH] Defeat current GCC optimizations in math autoconf tests. * m4/cbrtl.m4 (gl_FUNC_CBRTL): Mark function pointer as 'volatile'. * m4/ceil.m4 (gl_FUNC_CEIL): Likewise. * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise. * m4/ceill.m4 (gl_FUNC_CEILL): Likewise. * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise. * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise. * m4/floor.m4 (gl_FUNC_FLOOR): Likewise. * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise. * m4/fmod.m4 (gl_FUNC_FMOD): Likewise. * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise. * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise. * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise. * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise. * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise. * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise. * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise. * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Likewise. * m4/log.m4 (gl_FUNC_LOG): Likewise. * m4/logf.m4 (gl_FUNC_LOGF): Likewise. * m4/log10.m4 (gl_FUNC_LOG10): Likewise. * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise. * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise. * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise. * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise. * m4/log2.m4 (gl_FUNC_LOG2): Likewise. * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise. * m4/modf.m4 (gl_FUNC_MODF): Likewise. * m4/modff.m4 (gl_FUNC_MODFF): Likewise. * m4/modfl.m4 (gl_FUNC_MODFL): Likewise. * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise. * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise. * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise. * m4/round.m4 (gl_FUNC_ROUND): Likewise. * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise. * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise. * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise. * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise. --- ChangeLog | 42 ++++++++++++++++++++++++++++++++++++++++++ m4/cbrtl.m4 | 4 ++-- m4/ceil.m4 | 4 ++-- m4/ceilf.m4 | 4 ++-- m4/ceill.m4 | 4 ++-- m4/exp2l.m4 | 4 ++-- m4/expm1.m4 | 4 ++-- m4/floor.m4 | 4 ++-- m4/floorf.m4 | 4 ++-- m4/fmod.m4 | 4 ++-- m4/fmodf.m4 | 4 ++-- m4/fmodl.m4 | 4 ++-- m4/hypot.m4 | 4 ++-- m4/hypotf.m4 | 4 ++-- m4/hypotl.m4 | 4 ++-- m4/ilogb.m4 | 4 ++-- m4/ilogbf.m4 | 4 ++-- m4/ilogbl.m4 | 4 ++-- m4/log.m4 | 4 ++-- m4/log10.m4 | 4 ++-- m4/log10f.m4 | 4 ++-- m4/log1p.m4 | 4 ++-- m4/log1pf.m4 | 4 ++-- m4/log1pl.m4 | 4 ++-- m4/log2.m4 | 4 ++-- m4/log2f.m4 | 4 ++-- m4/logf.m4 | 4 ++-- m4/modf.m4 | 4 ++-- m4/modff.m4 | 4 ++-- m4/modfl.m4 | 4 ++-- m4/remainder.m4 | 4 ++-- m4/remainderf.m4 | 4 ++-- m4/remainderl.m4 | 4 ++-- m4/round.m4 | 4 ++-- m4/roundf.m4 | 4 ++-- m4/roundl.m4 | 4 ++-- m4/trunc.m4 | 4 ++-- m4/truncf.m4 | 4 ++-- m4/truncl.m4 | 4 ++-- 39 files changed, 118 insertions(+), 76 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02ed114123..a03d5dd8b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +2019-01-20 Bruno Haible + + Defeat current GCC optimizations in math autoconf tests. + * m4/cbrtl.m4 (gl_FUNC_CBRTL): Mark function pointer as 'volatile'. + * m4/ceil.m4 (gl_FUNC_CEIL): Likewise. + * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise. + * m4/ceill.m4 (gl_FUNC_CEILL): Likewise. + * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise. + * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise. + * m4/floor.m4 (gl_FUNC_FLOOR): Likewise. + * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise. + * m4/fmod.m4 (gl_FUNC_FMOD): Likewise. + * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise. + * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise. + * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise. + * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise. + * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise. + * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise. + * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise. + * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Likewise. + * m4/log.m4 (gl_FUNC_LOG): Likewise. + * m4/logf.m4 (gl_FUNC_LOGF): Likewise. + * m4/log10.m4 (gl_FUNC_LOG10): Likewise. + * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise. + * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise. + * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise. + * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise. + * m4/log2.m4 (gl_FUNC_LOG2): Likewise. + * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise. + * m4/modf.m4 (gl_FUNC_MODF): Likewise. + * m4/modff.m4 (gl_FUNC_MODFF): Likewise. + * m4/modfl.m4 (gl_FUNC_MODFL): Likewise. + * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise. + * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise. + * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise. + * m4/round.m4 (gl_FUNC_ROUND): Likewise. + * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. + * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise. + * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise. + * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise. + * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise. + 2019-01-19 Pádraig Brady gettext: support disabling use of VLAs diff --git a/m4/cbrtl.m4 b/m4/cbrtl.m4 index e0f736220a..dc867dbc28 100644 --- a/m4/cbrtl.m4 +++ b/m4/cbrtl.m4 @@ -1,4 +1,4 @@ -# cbrtl.m4 serial 7 +# cbrtl.m4 serial 8 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -59,7 +59,7 @@ int main (int argc, char *argv[]) "C" #endif long double cbrtl (long double); - long double (*my_cbrtl) (long double) = argc ? cbrtl : dummy; + long double (* volatile my_cbrtl) (long double) = argc ? cbrtl : dummy; long double f; /* Test cbrtl(-0.0). This test fails on IRIX 6.5. */ diff --git a/m4/ceil.m4 b/m4/ceil.m4 index 1b11b847e9..5522284667 100644 --- a/m4/ceil.m4 +++ b/m4/ceil.m4 @@ -1,4 +1,4 @@ -# ceil.m4 serial 12 +# ceil.m4 serial 13 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -32,7 +32,7 @@ AC_DEFUN([gl_FUNC_CEIL], static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { - double (*my_ceil) (double) = argc ? ceil : dummy; + double (* volatile my_ceil) (double) = argc ? ceil : dummy; int result = 0; /* Test whether ceil (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_ceil (minus_zerod))) diff --git a/m4/ceilf.m4 b/m4/ceilf.m4 index de4a80956e..65b4cffa73 100644 --- a/m4/ceilf.m4 +++ b/m4/ceilf.m4 @@ -1,4 +1,4 @@ -# ceilf.m4 serial 16 +# ceilf.m4 serial 17 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -39,7 +39,7 @@ AC_DEFUN([gl_FUNC_CEILF], static float dummy (float f) { return 0; } int main (int argc, char *argv[]) { - float (*my_ceilf) (float) = argc ? ceilf : dummy; + float (* volatile my_ceilf) (float) = argc ? ceilf : dummy; int result = 0; /* Test whether ceilf (-0.0f) is -0.0f. */ if (signbitf (minus_zerof) && !signbitf (my_ceilf (minus_zerof))) diff --git a/m4/ceill.m4 b/m4/ceill.m4 index 2663d4c82b..863c34450b 100644 --- a/m4/ceill.m4 +++ b/m4/ceill.m4 @@ -1,4 +1,4 @@ -# ceill.m4 serial 17 +# ceill.m4 serial 18 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -42,7 +42,7 @@ AC_DEFUN([gl_FUNC_CEILL], static long double dummy (long double f) { return 0; } int main (int argc, char *argv[]) { - long double (*my_ceill) (long double) = argc ? ceill : dummy; + long double (* volatile my_ceill) (long double) = argc ? ceill : dummy; /* Test whether ceill (-0.3L) is -0.0L. */ if (signbitl (minus_zerol) && !signbitl (my_ceill (-0.3L))) return 1; diff --git a/m4/exp2l.m4 b/m4/exp2l.m4 index d687e7d312..20630ccb17 100644 --- a/m4/exp2l.m4 +++ b/m4/exp2l.m4 @@ -1,4 +1,4 @@ -# exp2l.m4 serial 5 +# exp2l.m4 serial 6 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -50,7 +50,7 @@ static long double dummy (long double x) { return 0; } static long double zero; int main (int argc, char *argv[]) { - long double (*my_exp2l) (long double) = argc ? exp2l : dummy; + long double (* volatile my_exp2l) (long double) = argc ? exp2l : dummy; int result = 0; /* This test fails on OpenBSD 4.9, where exp2l(NaN) = 0.0. */ if (exp2l (zero / zero) == 0.0L) diff --git a/m4/expm1.m4 b/m4/expm1.m4 index 789f9acb01..fcea1df681 100644 --- a/m4/expm1.m4 +++ b/m4/expm1.m4 @@ -1,4 +1,4 @@ -# expm1.m4 serial 5 +# expm1.m4 serial 6 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -75,7 +75,7 @@ AC_DEFUN([gl_FUNC_EXPM1], static double dummy (double x) { return 0; } int main (int argc, char *argv[]) { - double (*my_expm1) (double) = argc ? expm1 : dummy; + double (* volatile my_expm1) (double) = argc ? expm1 : dummy; double y = my_expm1 (minus_zerod); if (!(y == 0.0) || (signbitd (minus_zerod) && !signbitd (y))) return 1; diff --git a/m4/floor.m4 b/m4/floor.m4 index 25a80b9832..7b3d96594e 100644 --- a/m4/floor.m4 +++ b/m4/floor.m4 @@ -1,4 +1,4 @@ -# floor.m4 serial 11 +# floor.m4 serial 12 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -32,7 +32,7 @@ AC_DEFUN([gl_FUNC_FLOOR], static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { - double (*my_floor) (double) = argc ? floor : dummy; + double (* volatile my_floor) (double) = argc ? floor : dummy; /* Test whether floor (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_floor (minus_zerod))) return 1; diff --git a/m4/floorf.m4 b/m4/floorf.m4 index 6713df8732..5fad8a504f 100644 --- a/m4/floorf.m4 +++ b/m4/floorf.m4 @@ -1,4 +1,4 @@ -# floorf.m4 serial 15 +# floorf.m4 serial 16 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -39,7 +39,7 @@ AC_DEFUN([gl_FUNC_FLOORF], static float dummy (float f) { return 0; } int main (int argc, char *argv[]) { - float (*my_floorf) (float) = argc ? floorf : dummy; + float (* volatile my_floorf) (float) = argc ? floorf : dummy; /* Test whether floorf (-0.0f) is -0.0f. */ if (signbitf (minus_zerof) && !signbitf (my_floorf (minus_zerof))) return 1; diff --git a/m4/fmod.m4 b/m4/fmod.m4 index 0b61649b82..898e9e8b16 100644 --- a/m4/fmod.m4 +++ b/m4/fmod.m4 @@ -1,4 +1,4 @@ -# fmod.m4 serial 6 +# fmod.m4 serial 7 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -39,7 +39,7 @@ numeric_equal (double x, double y) static double dummy (double x, double y) { return 0; } int main (int argc, char *argv[]) { - double (*my_fmod) (double, double) = argc ? fmod : dummy; + double (* volatile my_fmod) (double, double) = argc ? fmod : dummy; int result = 0; double f; /* Test fmod(...,0.0). diff --git a/m4/fmodf.m4 b/m4/fmodf.m4 index 5a6d7da698..42c64ab2b7 100644 --- a/m4/fmodf.m4 +++ b/m4/fmodf.m4 @@ -1,4 +1,4 @@ -# fmodf.m4 serial 8 +# fmodf.m4 serial 9 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -46,7 +46,7 @@ numeric_equal (float x, float y) static float dummy (float x, float y) { return 0; } int main (int argc, char *argv[]) { - float (*my_fmodf) (float, float) = argc ? fmodf : dummy; + float (* volatile my_fmodf) (float, float) = argc ? fmodf : dummy; float f; /* Test fmodf(...,0.0f). This test fails on OSF/1 5.1. */ diff --git a/m4/fmodl.m4 b/m4/fmodl.m4 index 8d3203179a..1e3e9aa957 100644 --- a/m4/fmodl.m4 +++ b/m4/fmodl.m4 @@ -1,4 +1,4 @@ -# fmodl.m4 serial 8 +# fmodl.m4 serial 9 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -57,7 +57,7 @@ numeric_equal (long double x, long double y) static long double dummy (long double x, long double y) { return 0; } int main (int argc, char *argv[]) { - long double (*my_fmodl) (long double, long double) = argc ? fmodl : dummy; + long double (* volatile my_fmodl) (long double, long double) = argc ? fmodl : dummy; long double f; /* Test fmodl(...,0.0L). This test fails on OSF/1 5.1. */ diff --git a/m4/hypot.m4 b/m4/hypot.m4 index 713dfa2736..a7242a2a52 100644 --- a/m4/hypot.m4 +++ b/m4/hypot.m4 @@ -1,4 +1,4 @@ -# hypot.m4 serial 6 +# hypot.m4 serial 7 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -42,7 +42,7 @@ double zero; double one = 1.0; int main (int argc, char *argv[]) { - double (*my_hypot) (double, double) = argc ? hypot : dummy; + double (* volatile my_hypot) (double, double) = argc ? hypot : dummy; double f; /* Test hypot(NaN,Infinity). This test fails on OSF/1 5.1 and native Windows. */ diff --git a/m4/hypotf.m4 b/m4/hypotf.m4 index 9e0773ecfd..80da9aeae6 100644 --- a/m4/hypotf.m4 +++ b/m4/hypotf.m4 @@ -1,4 +1,4 @@ -# hypotf.m4 serial 7 +# hypotf.m4 serial 8 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -58,7 +58,7 @@ float zero; float one = 1.0f; int main (int argc, char *argv[]) { - float (*my_hypotf) (float, float) = argc ? hypotf : dummy; + float (* volatile my_hypotf) (float, float) = argc ? hypotf : dummy; float f; /* Test hypotf(NaN,Infinity). This test fails on OSF/1 5.1 and native Windows. */ diff --git a/m4/hypotl.m4 b/m4/hypotl.m4 index 45cc999bbe..dcced7eef8 100644 --- a/m4/hypotl.m4 +++ b/m4/hypotl.m4 @@ -1,4 +1,4 @@ -# hypotl.m4 serial 8 +# hypotl.m4 serial 9 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -58,7 +58,7 @@ long double zero; long double one = 1.0L; int main (int argc, char *argv[]) { - long double (*my_hypotl) (long double, long double) = argc ? hypotl : dummy; + long double (* volatile my_hypotl) (long double, long double) = argc ? hypotl : dummy; long double f; /* Test hypotl(NaN,Infinity). This test fails on OSF/1 5.1 and native Windows. */ diff --git a/m4/ilogb.m4 b/m4/ilogb.m4 index 67d9d22ea8..53c3f05f27 100644 --- a/m4/ilogb.m4 +++ b/m4/ilogb.m4 @@ -1,4 +1,4 @@ -# ilogb.m4 serial 3 +# ilogb.m4 serial 4 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -85,7 +85,7 @@ static double zero; static int dummy (double x) { return 0; } int main (int argc, char *argv[]) { - int (*my_ilogb) (double) = argc ? ilogb : dummy; + int (* volatile my_ilogb) (double) = argc ? ilogb : dummy; int result = 0; /* This test fails on OpenBSD 4.9, AIX 5.1. */ { diff --git a/m4/ilogbf.m4 b/m4/ilogbf.m4 index 987400696f..cf0ebe4b3d 100644 --- a/m4/ilogbf.m4 +++ b/m4/ilogbf.m4 @@ -1,4 +1,4 @@ -# ilogbf.m4 serial 3 +# ilogbf.m4 serial 4 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -87,7 +87,7 @@ static float zero; static int dummy (float x) { return 0; } int main (int argc, char *argv[]) { - int (*my_ilogbf) (float) = argc ? ilogbf : dummy; + int (* volatile my_ilogbf) (float) = argc ? ilogbf : dummy; int result = 0; /* This test fails on OpenBSD 4.9. */ { diff --git a/m4/ilogbl.m4 b/m4/ilogbl.m4 index a164698181..c8ba52a23e 100644 --- a/m4/ilogbl.m4 +++ b/m4/ilogbl.m4 @@ -1,4 +1,4 @@ -# ilogbl.m4 serial 2 +# ilogbl.m4 serial 3 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -106,7 +106,7 @@ volatile long double x; static int dummy (long double x) { return 0; } int main (int argc, char *argv[]) { - int (*my_ilogbl) (long double) = argc ? ilogbl : dummy; + int (* volatile my_ilogbl) (long double) = argc ? ilogbl : dummy; int result = 0; /* This test fails on Haiku 2017. */ { diff --git a/m4/log.m4 b/m4/log.m4 index b02acb6156..a4e2a5c5b1 100644 --- a/m4/log.m4 +++ b/m4/log.m4 @@ -1,4 +1,4 @@ -# log.m4 serial 8 +# log.m4 serial 9 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -46,7 +46,7 @@ numeric_equal (double x, double y) static double dummy (double x) { return 0; } int main (int argc, char *argv[]) { - double (*my_log) (double) = argc ? log : dummy; + double (* volatile my_log) (double) = argc ? log : dummy; /* Test log(negative). This test fails on NetBSD 5.1, Solaris 11.4. */ double y = my_log (-1.0); diff --git a/m4/log10.m4 b/m4/log10.m4 index 102683b194..6af662414d 100644 --- a/m4/log10.m4 +++ b/m4/log10.m4 @@ -1,4 +1,4 @@ -# log10.m4 serial 8 +# log10.m4 serial 9 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -46,7 +46,7 @@ numeric_equal (double x, double y) static double dummy (double x) { return 0; } int main (int argc, char *argv[]) { - double (*my_log10) (double) = argc ? log10 : dummy; + double (* volatile my_log10) (double) = argc ? log10 : dummy; /* Test log10(negative). This test fails on NetBSD 5.1, Solaris 11.4. */ double y = my_log10 (-1.0); diff --git a/m4/log10f.m4 b/m4/log10f.m4 index 1d9ee615a2..47501dd784 100644 --- a/m4/log10f.m4 +++ b/m4/log10f.m4 @@ -1,4 +1,4 @@ -# log10f.m4 serial 9 +# log10f.m4 serial 10 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -56,7 +56,7 @@ numeric_equal (float x, float y) static float dummy (float x) { return 0; } int main (int argc, char *argv[]) { - float (*my_log10f) (float) = argc ? log10f : dummy; + float (* volatile my_log10f) (float) = argc ? log10f : dummy; /* Test log10f(negative). This test fails on NetBSD 5.1. */ float y = my_log10f (-1.0f); diff --git a/m4/log1p.m4 b/m4/log1p.m4 index 864a6d81c6..b5dd430b0d 100644 --- a/m4/log1p.m4 +++ b/m4/log1p.m4 @@ -1,4 +1,4 @@ -# log1p.m4 serial 5 +# log1p.m4 serial 6 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,7 +41,7 @@ AC_DEFUN([gl_FUNC_LOG1P], static double dummy (double x) { return 0; } int main (int argc, char *argv[]) { - double (*my_log1p) (double) = argc ? log1p : dummy; + double (* volatile my_log1p) (double) = argc ? log1p : dummy; /* This test fails on AIX, HP-UX 11. */ double y = my_log1p (minus_zerod); if (!(y == 0.0) || (signbitd (minus_zerod) && !signbitd (y))) diff --git a/m4/log1pf.m4 b/m4/log1pf.m4 index f4055f8cbb..4a2c35a61d 100644 --- a/m4/log1pf.m4 +++ b/m4/log1pf.m4 @@ -1,4 +1,4 @@ -# log1pf.m4 serial 5 +# log1pf.m4 serial 6 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -50,7 +50,7 @@ AC_DEFUN([gl_FUNC_LOG1PF], static float dummy (float x) { return 0; } int main (int argc, char *argv[]) { - float (*my_log1pf) (float) = argc ? log1pf : dummy; + float (* volatile my_log1pf) (float) = argc ? log1pf : dummy; /* This test fails on OpenBSD 4.9, AIX 7.1. */ float y = my_log1pf (minus_zerof); if (!(y == 0.0f) || (signbitf (minus_zerof) && !signbitf (y))) diff --git a/m4/log1pl.m4 b/m4/log1pl.m4 index 462c0e546b..7def39136c 100644 --- a/m4/log1pl.m4 +++ b/m4/log1pl.m4 @@ -1,4 +1,4 @@ -# log1pl.m4 serial 5 +# log1pl.m4 serial 6 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,7 +41,7 @@ AC_DEFUN([gl_FUNC_LOG1PL], static long double dummy (long double x) { return 0; } int main (int argc, char *argv[]) { - long double (*my_log1pl) (long double) = argc ? log1pl : dummy; + long double (* volatile my_log1pl) (long double) = argc ? log1pl : dummy; /* This test fails on AIX 7.1, IRIX 6.5. */ long double y = my_log1pl (minus_zerol); if (!(y == 0.0L) || (signbitl (minus_zerol) && !signbitl (y))) diff --git a/m4/log2.m4 b/m4/log2.m4 index 7fd56faa97..bd8b3cff0c 100644 --- a/m4/log2.m4 +++ b/m4/log2.m4 @@ -1,4 +1,4 @@ -# log2.m4 serial 7 +# log2.m4 serial 8 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -67,7 +67,7 @@ numeric_equal (double x, double y) static double dummy (double x) { return 0; } int main (int argc, char *argv[]) { - double (*my_log2) (double) = argc ? log2 : dummy; + double (* volatile my_log2) (double) = argc ? log2 : dummy; /* Test log2(negative). This test fails on NetBSD 5.1 and Solaris 10/x86_64. */ double y = my_log2 (-1.0); diff --git a/m4/log2f.m4 b/m4/log2f.m4 index b294b7f680..63b8458ca9 100644 --- a/m4/log2f.m4 +++ b/m4/log2f.m4 @@ -1,4 +1,4 @@ -# log2f.m4 serial 7 +# log2f.m4 serial 8 dnl Copyright (C) 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -68,7 +68,7 @@ numeric_equal (float x, float y) static float dummy (float x) { return 0; } int main (int argc, char *argv[]) { - float (*my_log2f) (float) = argc ? log2f : dummy; + float (* volatile my_log2f) (float) = argc ? log2f : dummy; /* Test log2f(negative). This test fails on NetBSD 5.1 and Solaris 10/x86_64. */ float y = my_log2f (-1.0f); diff --git a/m4/logf.m4 b/m4/logf.m4 index ac0aab73b5..6b9e5bbf1f 100644 --- a/m4/logf.m4 +++ b/m4/logf.m4 @@ -1,4 +1,4 @@ -# logf.m4 serial 9 +# logf.m4 serial 10 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -56,7 +56,7 @@ numeric_equal (float x, float y) static float dummy (float x) { return 0; } int main (int argc, char *argv[]) { - float (*my_logf) (float) = argc ? logf : dummy; + float (* volatile my_logf) (float) = argc ? logf : dummy; /* Test logf(negative). This test fails on NetBSD 5.1. */ float y = my_logf (-1.0f); diff --git a/m4/modf.m4 b/m4/modf.m4 index 6d86d32ba1..b5038441a3 100644 --- a/m4/modf.m4 +++ b/m4/modf.m4 @@ -1,4 +1,4 @@ -# modf.m4 serial 5 +# modf.m4 serial 6 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,7 +41,7 @@ double zero; double minus_one = - 1.0; int main (int argc, char *argv[]) { - double (*my_modf) (double, double *) = argc ? modf : dummy; + double (* volatile my_modf) (double, double *) = argc ? modf : dummy; int result = 0; double i; double f; diff --git a/m4/modff.m4 b/m4/modff.m4 index c7b2a17b04..e1fbf1db8f 100644 --- a/m4/modff.m4 +++ b/m4/modff.m4 @@ -1,4 +1,4 @@ -# modff.m4 serial 7 +# modff.m4 serial 8 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -49,7 +49,7 @@ float zero; float minus_one = - 1.0f; int main (int argc, char *argv[]) { - float (*my_modff) (float, float *) = argc ? modff : dummy; + float (* volatile my_modff) (float, float *) = argc ? modff : dummy; int result = 0; float i; float f; diff --git a/m4/modfl.m4 b/m4/modfl.m4 index 8b5bc7b10b..fc32cd648f 100644 --- a/m4/modfl.m4 +++ b/m4/modfl.m4 @@ -1,4 +1,4 @@ -# modfl.m4 serial 5 +# modfl.m4 serial 6 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -49,7 +49,7 @@ long double zero; long double minus_one = - 1.0L; int main (int argc, char *argv[]) { - long double (*my_modfl) (long double, long double *) = argc ? modfl : dummy; + long double (* volatile my_modfl) (long double, long double *) = argc ? modfl : dummy; long double i; long double f; /* Test modfl(-Inf,...). diff --git a/m4/remainder.m4 b/m4/remainder.m4 index 0e9d19e9e0..58548bad0c 100644 --- a/m4/remainder.m4 +++ b/m4/remainder.m4 @@ -1,4 +1,4 @@ -# remainder.m4 serial 6 +# remainder.m4 serial 7 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -79,7 +79,7 @@ numeric_equal (double x, double y) static double dummy (double x, double y) { return 0; } int main (int argc, char *argv[]) { - double (*my_remainder) (double, double) = argc ? remainder : dummy; + double (* volatile my_remainder) (double, double) = argc ? remainder : dummy; double f; /* Test remainder(...,0.0). This test fails on OSF/1 5.1. */ diff --git a/m4/remainderf.m4 b/m4/remainderf.m4 index ff4e98d563..5ab511a150 100644 --- a/m4/remainderf.m4 +++ b/m4/remainderf.m4 @@ -1,4 +1,4 @@ -# remainderf.m4 serial 10 +# remainderf.m4 serial 11 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -82,7 +82,7 @@ numeric_equal (float x, float y) static float dummy (float x, float y) { return 0; } int main (int argc, char *argv[]) { - float (*my_remainderf) (float, float) = argc ? remainderf : dummy; + float (* volatile my_remainderf) (float, float) = argc ? remainderf : dummy; float f; /* Test remainderf(...,0.0f). This test fails on OSF/1 5.1. */ diff --git a/m4/remainderl.m4 b/m4/remainderl.m4 index cfa94f5443..85ed6befa8 100644 --- a/m4/remainderl.m4 +++ b/m4/remainderl.m4 @@ -1,4 +1,4 @@ -# remainderl.m4 serial 9 +# remainderl.m4 serial 10 dnl Copyright (C) 2012-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -87,7 +87,7 @@ numeric_equal (long double x, long double y) static long double dummy (long double x, long double y) { return 0; } int main (int argc, char *argv[]) { - long double (*my_remainderl) (long double, long double) = argc ? remainderl : dummy; + long double (* volatile my_remainderl) (long double, long double) = argc ? remainderl : dummy; long double f; /* Test remainderl(...,0.0L). This test fails on OSF/1 5.1. */ diff --git a/m4/round.m4 b/m4/round.m4 index cbc9f023c5..49ae315ffe 100644 --- a/m4/round.m4 +++ b/m4/round.m4 @@ -1,4 +1,4 @@ -# round.m4 serial 19 +# round.m4 serial 20 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -103,7 +103,7 @@ double round (double); static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { - double (*my_round) (double) = argc ? round : dummy; + double (* volatile my_round) (double) = argc ? round : dummy; /* Test whether round (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_round (minus_zerod))) return 1; diff --git a/m4/roundf.m4 b/m4/roundf.m4 index e0530ba19c..07f816e2c0 100644 --- a/m4/roundf.m4 +++ b/m4/roundf.m4 @@ -1,4 +1,4 @@ -# roundf.m4 serial 20 +# roundf.m4 serial 21 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -99,7 +99,7 @@ float roundf (float); static float dummy (float f) { return 0; } int main (int argc, char *argv[]) { - float (*my_roundf) (float) = argc ? roundf : dummy; + float (* volatile my_roundf) (float) = argc ? roundf : dummy; int result = 0; /* Test whether roundf (-0.0f) is -0.0f. */ if (signbitf (minus_zerof) && !signbitf (my_roundf (minus_zerof))) diff --git a/m4/roundl.m4 b/m4/roundl.m4 index 0bc0391279..95eed1bd05 100644 --- a/m4/roundl.m4 +++ b/m4/roundl.m4 @@ -1,4 +1,4 @@ -# roundl.m4 serial 17 +# roundl.m4 serial 18 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -50,7 +50,7 @@ long double roundl (long double); static long double dummy (long double f) { return 0; } int main (int argc, char *argv[]) { - long double (*my_roundl) (long double) = argc ? roundl : dummy; + long double (* volatile my_roundl) (long double) = argc ? roundl : dummy; int result = 0; /* Test whether roundl (-0.0L) is -0.0L. */ if (signbitl (minus_zerol) && !signbitl (my_roundl (minus_zerol))) diff --git a/m4/trunc.m4 b/m4/trunc.m4 index ef8d59bc7c..056d56de80 100644 --- a/m4/trunc.m4 +++ b/m4/trunc.m4 @@ -1,4 +1,4 @@ -# trunc.m4 serial 12 +# trunc.m4 serial 13 dnl Copyright (C) 2007, 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_TRUNC], static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { - double (*my_trunc) (double) = argc ? trunc : dummy; + double (* volatile my_trunc) (double) = argc ? trunc : dummy; /* Test whether trunc (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_trunc (minus_zerod))) return 1; diff --git a/m4/truncf.m4 b/m4/truncf.m4 index af6eeeb061..1ee987b711 100644 --- a/m4/truncf.m4 +++ b/m4/truncf.m4 @@ -1,4 +1,4 @@ -# truncf.m4 serial 12 +# truncf.m4 serial 13 dnl Copyright (C) 2007, 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_TRUNCF], static float dummy (float f) { return 0; } int main (int argc, char *argv[]) { - float (*my_truncf) (float) = argc ? truncf : dummy; + float (* volatile my_truncf) (float) = argc ? truncf : dummy; /* Test whether truncf (-0.0f) is -0.0f. */ if (signbitf (minus_zerof) && !signbitf (my_truncf (minus_zerof))) return 1; diff --git a/m4/truncl.m4 b/m4/truncl.m4 index 65f1fcecf4..b03d04cc11 100644 --- a/m4/truncl.m4 +++ b/m4/truncl.m4 @@ -1,4 +1,4 @@ -# truncl.m4 serial 14 +# truncl.m4 serial 15 dnl Copyright (C) 2007-2008, 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -95,7 +95,7 @@ int main() static long double dummy (long double f) { return 0; } int main (int argc, char *argv[]) { - long double (*my_truncl) (long double) = argc ? truncl : dummy; + long double (* volatile my_truncl) (long double) = argc ? truncl : dummy; /* Test whether truncl (-0.3L) is -0.0L. */ if (signbitl (minus_zerol) && !signbitl (my_truncl (-0.3L))) return 1; -- 2.39.5