+2019-08-18 Bruno Haible <bruno@clisp.org>
+
+ Defeat -flto GCC optimization in math autoconf tests.
+ Reported by Tomasz Kłoczko <kloczko.tomasz@gmail.com>
+ at <https://savannah.gnu.org/bugs/?56109>.
+ * m4/mathfunc.m4 (gl_MATHFUNC): Mark function pointer as 'volatile'.
+ * m4/acosl.m4 (gl_FUNC_ACOSL): Likewise.
+ * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
+ * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
+ * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
+ * m4/exp2.m4 (gl_FUNC_EXP2): Likewise.
+ * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
+ * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
+ * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
+ * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
+ * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
+ * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
+
2019-08-17 Bruno Haible <bruno@clisp.org>
windows-spin: Implement declared functions.
-# acosl.m4 serial 8
+# acosl.m4 serial 9
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = acosl;
+ long double (* volatile funcptr) (long double) = acosl;
long double x;]],
[[return funcptr (x) > 1
|| acosl (x) > 1;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = acosl;
+ long double (* volatile funcptr) (long double) = acosl;
long double x;]],
[[return funcptr (x) > 1
|| acosl (x) > 1;]])],
-# asinl.m4 serial 8
+# asinl.m4 serial 9
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = asinl;
+ long double (* volatile funcptr) (long double) = asinl;
long double x;]],
[[return funcptr (x) > 1
|| asinl (x) > 1;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = asinl;
+ long double (* volatile funcptr) (long double) = asinl;
long double x;]],
[[return funcptr (x) > 1
|| asinl (x) > 1;]])],
-# atanl.m4 serial 8
+# atanl.m4 serial 9
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = atanl;
+ long double (* volatile funcptr) (long double) = atanl;
long double x;]],
[[return funcptr (x) > 1
|| atanl (x) > 1;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = atanl;
+ long double (* volatile funcptr) (long double) = atanl;
long double x;]],
[[return funcptr (x) > 1
|| atanl (x) > 1;]])],
-# cosl.m4 serial 8
+# cosl.m4 serial 9
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = cosl;
+ long double (* volatile funcptr) (long double) = cosl;
long double x;]],
[[return funcptr (x) > 0.4
|| cosl (x) > 0.4;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = cosl;
+ long double (* volatile funcptr) (long double) = cosl;
long double x;]],
[[return funcptr (x) > 0.4
|| cosl (x) > 0.4;]])],
-# exp2.m4 serial 2
+# exp2.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,
"C"
#endif
double exp2 (double);
- double (*funcptr) (double) = exp2;
+ double (* volatile funcptr) (double) = exp2;
double x;]],
[[return funcptr (x) > 1.5
|| exp2 (x) > 1.5;]])],
"C"
#endif
double exp2 (double);
- double (*funcptr) (double) = exp2;
+ double (* volatile funcptr) (double) = exp2;
double x;]],
[[return funcptr (x) > 1.5
|| exp2 (x) > 1.5;]])],
-# expl.m4 serial 13
+# expl.m4 serial 14
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = expl;
+ long double (* volatile funcptr) (long double) = expl;
long double x;]],
[[return funcptr (x) > 1.5
|| expl (x) > 1.5;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = expl;
+ long double (* volatile funcptr) (long double) = expl;
long double x;]],
[[return funcptr (x) > 1.5
|| expl (x) > 1.5;]])],
-# expm1.m4 serial 7
+# expm1.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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- double (*funcptr) (double) = expm1;
+ double (* volatile funcptr) (double) = expm1;
double x;]],
[[return funcptr (x) > 0.5
|| expm1 (x) > 0.5;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- double (*funcptr) (double) = expm1;
+ double (* volatile funcptr) (double) = expm1;
double x;]],
[[return funcptr (x) > 0.5
|| expm1 (x) > 0.5;]])],
-# expm1l.m4 serial 4
+# expm1l.m4 serial 5
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,
"C"
#endif
long double expm1l (long double);
- long double (*funcptr) (long double) = expm1l;
+ long double (* volatile funcptr) (long double) = expm1l;
long double x;]],
[[return funcptr (x) > 0.5
|| expm1l (x) > 0.5;]])],
"C"
#endif
long double expm1l (long double);
- long double (*funcptr) (long double) = expm1l;
+ long double (* volatile funcptr) (long double) = expm1l;
long double x;]],
[[return funcptr (x) > 0.5
|| expm1l (x) > 0.5;]])],
-# mathfunc.m4 serial 11
+# mathfunc.m4 serial 12
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,
#endif
#include <math.h>
$4
- $2 (*funcptr) $3 = ]func[;
+ $2 (* volatile funcptr) $3 = ]func[;
int i_ret;
float f_ret;
double d_ret;
#endif
#include <math.h>
$4
- $2 (*funcptr) $3 = ]func[;
+ $2 (* volatile funcptr) $3 = ]func[;
int i_ret;
float f_ret;
double d_ret;
-# sinl.m4 serial 8
+# sinl.m4 serial 9
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = sinl;
+ long double (* volatile funcptr) (long double) = sinl;
long double x;]],
[[return funcptr (x) > 0.4
|| sinl (x) > 0.4;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = sinl;
+ long double (* volatile funcptr) (long double) = sinl;
long double x;]],
[[return funcptr (x) > 0.4
|| sinl (x) > 0.4;]])],
-# sqrtl.m4 serial 10
+# sqrtl.m4 serial 11
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = sqrtl;
+ long double (* volatile funcptr) (long double) = sqrtl;
long double x;]],
[[return funcptr (x) > 0.4
|| sqrtl (x) > 0.4;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = sqrtl;
+ long double (* volatile funcptr) (long double) = sqrtl;
long double x;]],
[[return funcptr (x) > 0.4
|| sqrtl (x) > 0.4;]])],
-# tanl.m4 serial 8
+# tanl.m4 serial 9
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,
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = tanl;
+ long double (* volatile funcptr) (long double) = tanl;
long double x;]],
[[return funcptr (x) > 0.4
|| tanl (x) > 0.4;]])],
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
- long double (*funcptr) (long double) = tanl;
+ long double (* volatile funcptr) (long double) = tanl;
long double x;]],
[[return funcptr (x) > 0.4
|| tanl (x) > 0.4;]])],