/* Test compilation of tgmath macros.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com> and
Ulrich Drepper <drepper@redhat.com>, 2001.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifndef HAVE_MAIN
-#undef __NO_MATH_INLINES
-#define __NO_MATH_INLINES 1
+#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
static void compile_test (void);
static void compile_testf (void);
-#ifndef NO_LONG_DOUBLE
+#if LDBL_MANT_DIG > DBL_MANT_DIG
static void compile_testl (void);
#endif
complex double dz;
complex long double lz;
-int count_double;
-int count_float;
-int count_ldouble;
-int count_cdouble;
-int count_cfloat;
-int count_cldouble;
+volatile int count_double;
+volatile int count_float;
+volatile int count_ldouble;
+volatile int count_cdouble;
+volatile int count_cfloat;
+volatile int count_cldouble;
-#define NCALLS 138
+#define NCALLS 132
#define NCALLS_INT 4
#define NCCALLS 47
result = 1;
}
-#ifndef NO_LONG_DOUBLE
+#if LDBL_MANT_DIG > DBL_MANT_DIG
count_float = count_double = count_ldouble = 0;
count_cfloat = count_cdouble = count_cldouble = 0;
compile_testl ();
#define ccount count_cfloat
#include "test-tgmath.c"
-#ifndef NO_LONG_DOUBLE
+#if LDBL_MANT_DIG > DBL_MANT_DIG
#define F(name) name##l
#define TYPE long double
#define x lx
b = fmaxmag (fmaxmag (a, x), fmaxmag (c, b));
a = fminmag (fminmag (x, a), fminmag (c, b));
b = fma (sin (a), sin (x), sin (c));
- a = totalorder (totalorder (x, b), totalorder (c, x));
- b = totalordermag (totalordermag (x, a), totalordermag (c, x));
#ifdef TEST_INT
a = atan2 (i, b);
a = fmaxmag (y, y);
a = fminmag (y, y);
a = fma (y, y, y);
- a = totalorder (y, y);
- a = totalordermag (y, y);
#ifdef TEST_INT
a = atan2 (i, y);
return x + y + z;
}
-int
-(F(totalorder)) (TYPE x, TYPE y)
-{
- ++count;
- P ();
- return x + y;
-}
-
-int
-(F(totalordermag)) (TYPE x, TYPE y)
-{
- ++count;
- P ();
- return x + y;
-}
-
complex TYPE
(F(cacos)) (complex TYPE x)
{