| 1 |
/* PR libstdc++/85466 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-require-effective-target c99_runtime } */ |
| 4 |
/* { dg-options "-O2 -fno-builtin" } */ |
| 5 |
/* { dg-add-options ieee } */ |
| 6 |
|
| 7 |
#include <stdlib.h> |
| 8 |
|
| 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 |
|
| 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 |
| 28 |
|
| 29 |
#define _NEXT_AFTER_2 |
| 30 |
|
| 31 |
#include "nextafter-1.c" |