From c18578632fd3c9e513e613a86ba2b7c4ebee6c45 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 30 Sep 2014 18:22:48 +0400 Subject: Imported Upstream version 8.23 --- gnulib-tests/test-signbit.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnulib-tests/test-signbit.c') diff --git a/gnulib-tests/test-signbit.c b/gnulib-tests/test-signbit.c index e8ea097c..584bf4f9 100644 --- a/gnulib-tests/test-signbit.c +++ b/gnulib-tests/test-signbit.c @@ -1,5 +1,5 @@ /* Test of signbit() 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 @@ -151,6 +151,16 @@ test_signbitl () #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; + +#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 = zerol / zerol; # if LDBL_EXPBIT0_BIT > 0 -- cgit v1.2.3