diagnostics: move output formats from diagnostic.{c,h} to their own files
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr60203.c
blob5a129f59c974b13796d3bbf711bb4ef68e8c4c91
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O3" } */
4 /* { dg-require-effective-target longdouble128 } */
5 /* { dg-require-effective-target powerpc_vsx } */
7 #if defined(__LONG_DOUBLE_IEEE128__)
8 /* If long double is IEEE 128-bit, we need to use the __ibm128 type instead of
9 long double. We can't use __ibm128 on systems that don't support IEEE
10 128-bit floating point, because the type is not enabled on those
11 systems. */
12 #define LDOUBLE __ibm128
14 #elif defined(__LONG_DOUBLE_IBM128__)
15 #define LDOUBLE long double
17 #else
18 #error "long double must be either IBM 128-bit or IEEE 128-bit"
19 #endif
21 union u_ld { LDOUBLE ld; double d[2]; };
23 LDOUBLE
24 pack (double a, double aa)
26 union u_ld u;
27 u.d[0] = a;
28 u.d[1] = aa;
29 return u.ld;
32 double
33 unpack_0 (LDOUBLE x)
35 union u_ld u;
36 u.ld = x;
37 return u.d[0];
40 double
41 unpack_1 (LDOUBLE x)
43 union u_ld u;
44 u.ld = x;
45 return u.d[1];
48 /* { dg-final { scan-assembler-not "stfd" } } */
49 /* { dg-final { scan-assembler-not "lfd" } } */
50 /* { dg-final { scan-assembler-not "lxsdx" } } */
51 /* { dg-final { scan-assembler-not "stxsdx" } } */
52 /* { dg-final { scan-assembler-not "mfvsrd" } } */
53 /* { dg-final { scan-assembler-not "mtvsrd" } } */