Merge from trunk @ 138209
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20080704-1.c
blobb5e38b4ba602f5fd8da01e5e468a2f7c1c0b0ee1
1 /* This code used to crash fold_convert due to PRE
2 wanting to fold_convert from a REAL_TYPE to an INTEGER_TYPE. */
3 typedef unsigned int uint32_t;
4 union double_union
6 double d;
7 uint32_t i[2];
8 };
9 struct _Jv_reent
11 int _errno;
13 _Jv_strtod_r (struct _Jv_reent *ptr, char **se)
15 int bb2, sign;
16 double aadj, aadj1, adj;
17 unsigned long y, z;
18 union double_union rv, *bs = ((void *) 0), *delta = ((void *) 0);
20 ovfl:ptr->_errno = 34;
22 (((uint32_t) 0xfffffL) | ((uint32_t) 0x100000L) * (1024 + 1023 - 1));
24 if ((aadj = _Jv_ratio (delta, bs)) <= 2.)
27 if (aadj < 2. / 2)
28 aadj = 1. / 2;
29 aadj1 = -aadj;
33 (rv.i[1]) -= 53 * ((uint32_t) 0x100000L);
34 adj = aadj1 * _Jv_ulp (rv.d);
35 rv.d += adj;
36 if (((rv.i[1]) & ((uint32_t) 0x7ff00000L)) >=
37 ((uint32_t) 0x100000L) * (1024 + 1023 - 53))
39 goto ovfl;