1 /* { dg-do run { target { powerpc*-*-linux* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
4 /* { dg-require-effective-target vsx_hw } */
5 /* { dg-options "-O2" } */
18 double high
= pow (2.0, 60);
20 long double a
= ((long double)high
) + ((long double)low
);
21 double x0
= __builtin_unpack_longdouble (a
, 0);
22 double x1
= __builtin_unpack_longdouble (a
, 1);
23 long double b
= __builtin_pack_longdouble (x0
, x1
);
31 unsigned char uc
[sizeof (long double)];
32 char c
[sizeof (long double)];
37 for (i
= 0; i
< sizeof (long double); i
++)
38 printf ("%.2x", u
.uc
[i
]);
40 printf (", %Lg\n", a
);
44 for (i
= 0; i
< sizeof (long double); i
++)
45 printf ("%.2x", u
.uc
[i
]);
47 printf (", %Lg\n", b
);
51 for (i
= 0; i
< sizeof (double); i
++)
52 printf ("%.2x", u
.uc
[i
]);
54 printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", high
);
58 for (i
= 0; i
< sizeof (double); i
++)
59 printf ("%.2x", u
.uc
[i
]);
61 printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", low
);
65 for (i
= 0; i
< sizeof (double); i
++)
66 printf ("%.2x", u
.uc
[i
]);
68 printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", x0
);
72 for (i
= 0; i
< sizeof (double); i
++)
73 printf ("%.2x", u
.uc
[i
]);
75 printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", x1
);