Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/20080704-1.c

raw
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 /* { dg-additional-options "-fpermissive" } */
4 typedef unsigned int uint32_t;
5 union double_union
6 {
7 double d;
8 uint32_t i[2];
9 };
10 struct _Jv_reent
11 {
12 int _errno;
13 };
14 _Jv_strtod_r (struct _Jv_reent *ptr, char **se)
15 {
16 int bb2, sign;
17 double aadj, aadj1, adj;
18 unsigned long y, z;
19 union double_union rv, *bs = ((void *) 0), *delta = ((void *) 0);
20 {
21 ovfl:ptr->_errno = 34;
22 {
23 (((uint32_t) 0xfffffL) | ((uint32_t) 0x100000L) * (1024 + 1023 - 1));
24 }
25 if ((aadj = _Jv_ratio (delta, bs)) <= 2.)
26 {
27 {
28 if (aadj < 2. / 2)
29 aadj = 1. / 2;
30 aadj1 = -aadj;
31 }
32 }
33 {
34 (rv.i[1]) -= 53 * ((uint32_t) 0x100000L);
35 adj = aadj1 * _Jv_ulp (rv.d);
36 rv.d += adj;
37 if (((rv.i[1]) & ((uint32_t) 0x7ff00000L)) >=
38 ((uint32_t) 0x100000L) * (1024 + 1023 - 53))
39 {
40 goto ovfl;
41 }
42 }
43 }
44 }