diff options
Diffstat (limited to 'gnulib-tests/test-isnanl.h')
-rw-r--r-- | gnulib-tests/test-isnanl.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnulib-tests/test-isnanl.h b/gnulib-tests/test-isnanl.h index 06e6a7ce..015b0864 100644 --- a/gnulib-tests/test-isnanl.h +++ b/gnulib-tests/test-isnanl.h @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007-2013 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,6 +51,15 @@ main () /* A bit pattern that is different from a Quiet NaN. With a bit of luck, it's a Signalling NaN. */ { +#if defined __powerpc__ && LDBL_MANT_DIG == 106 + /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are + represented as the corresponding 64-bit IEEE values in the first double; + the second is ignored. Manipulate only the first double. */ + #undef NWORDS + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +#endif + memory_long_double m; m.value = NaNl (); # if LDBL_EXPBIT0_BIT > 0 |