summaryrefslogtreecommitdiff
path: root/m4/exp2.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-08-18 16:12:29 +0200
committerBruno Haible <bruno@clisp.org>2019-08-18 16:12:29 +0200
commitbdf8b1d2b74e12648edafffcda43832bc35e3d1f (patch)
tree0b58351a42501e33df1c1dee817fdc60dd6cddc9 /m4/exp2.m4
parentb3cde21d1fb6391686e4fa68506131fb65ca256f (diff)
downloadgnulib-bdf8b1d2b74e12648edafffcda43832bc35e3d1f.tar.gz
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.
Diffstat (limited to 'm4/exp2.m4')
-rw-r--r--m4/exp2.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/m4/exp2.m4 b/m4/exp2.m4
index c5c58bd50b..b6cf666f49 100644
--- a/m4/exp2.m4
+++ b/m4/exp2.m4
@@ -1,4 +1,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,
@@ -26,7 +26,7 @@ AC_DEFUN([gl_FUNC_EXP2],
"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;]])],
@@ -50,7 +50,7 @@ AC_DEFUN([gl_FUNC_EXP2],
"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;]])],