]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/nextafter-2.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / nextafter-2.c
CommitLineData
04782385
JJ
1/* PR libstdc++/85466 */
2/* { dg-do run } */
4826f48e 3/* { dg-require-effective-target c99_runtime } */
04782385
JJ
4/* { dg-options "-O2 -fno-builtin" } */
5/* { dg-add-options ieee } */
6
573d8a24
JJ
7#include <stdlib.h>
8
81a3f3d1
MM
9/* In order to run on systems like the PowerPC that have 3 different long
10 double types, include math.h so it can choose what is the appropriate
11 nextafterl function to use.
12
13 If we didn't use -fno-builtin for this test, the PowerPC compiler would have
14 changed the names of the built-in functions that use long double. The
15 nextafter-1.c function runs with this mapping.
16
17 Since this test uses -fno-builtin, include math.h, so that math.h can make
18 the appropriate choice to use. */
19#include <math.h>
20
573d8a24
JJ
21#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
22# if !__GLIBC_PREREQ (2, 24)
23/* Workaround buggy nextafterl in glibc 2.23 and earlier,
24 see https://sourceware.org/bugzilla/show_bug.cgi?id=20205 */
25# define NO_LONG_DOUBLE 1
26# endif
27#endif
8f81f43f
DE
28
29#define _NEXT_AFTER_2
30
04782385 31#include "nextafter-1.c"