Merge from mainline.
[official-gcc.git] / gcc / testsuite / gcc.dg / ultrasp7.c
blobdefe5f3c7ad61b0ee0e88f950a4251bd33184311
1 /* PR c/8281 */
2 /* Originator: TANIGUCHI Yasuaki <yasuaki@k8.dion.ne.jp> */
3 /* { dg-do compile { target sparc-*-* } } */
4 /* { dg-options "-O2 -mcpu=ultrasparc -fPIC" } */
6 static const double bp = 1.0, dp_l[] = { 0.0 };
8 double __ieee754_pow(double x, double y)
10 union {
11 int lo;
12 double d;
13 }uz;
15 double y1,t1,p_h,t,z;
16 double z_h,z_l,p_l;
17 double t2,r,s,u,v,w;
18 int i = 0;
20 double s_h,t_h;
21 double s2,s_l,t_l;
24 v = 1.0/(v+bp);
25 uz.d = s_h = s = u*v;
26 uz.lo = 0;
27 s_h = uz.d;
28 uz.d = t_h;
29 uz.lo = 3;
30 t_h = uz.d;
31 s_l = v*((u-s_h*t_h)-s_h*t_l);
32 s2 = s*s;
33 r = s2* s2* (1.1+s2*(1.2+s2*(1.3+s2*(1.4+s2*(1.5+s2*1.6)))));
34 s2 = s_h*s_h;
35 uz.lo = 0;
36 t_h = uz.d;
37 t_l = r-((t_h-3.0)-s2);
38 v = s_l*t_h+t_l*s;
39 p_l = v-(p_h-u);
40 z_h = bp *p_h;
41 z_l = bp*p_h+p_l*1.0+dp_l[i];
42 t = (double)i;
43 t1 = (((bp+z_l)+bp)+t);
44 t2 = z_l-(((t1-t)-bp)-z_h);
45 p_l = (y-y1)*t1+y*t2;
46 z = p_l+p_h;
48 return s*z;