2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ieee / 20010226-1.c
blobdaa2745e93944c11530228f6e7a466ac70b65ed2
1 #include <float.h>
3 long double dfrom = 1.1;
4 long double m1;
5 long double m2;
6 unsigned long mant_long;
8 int main()
10 /* Some targets don't support a conforming long double type. This is
11 common with very small parts which set long double == float. Look
12 to see if the type has at least 32 bits of precision. */
13 if (LDBL_EPSILON > 0x1p-31L)
14 return 0;
16 m1 = dfrom / 2.0;
17 m2 = m1 * 4294967296.0;
18 mant_long = ((unsigned long) m2) & 0xffffffff;
20 if (mant_long == 0x8ccccccc)
21 return 0;
22 else
23 abort();