[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr67808.c
blob44d094fdede5b22b4b860f7841cf7355d22085c0
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O1 -mvsx -mdejagnu-cpu=power7 -mlong-double-128" } */
6 /* PR 67808: LRA ICEs on simple double to long double conversion test case */
8 #if defined(__LONG_DOUBLE_IEEE128__)
9 /* If long double is IEEE 128-bit, we need to use the __ibm128 type instead of
10 long double. We can't use __ibm128 on systems that don't support IEEE
11 128-bit floating point, because the type is not enabled on those
12 systems. */
13 #define LDOUBLE __ibm128
15 #elif defined(__LONG_DOUBLE_IBM128__)
16 #define LDOUBLE long double
18 #else
19 #error "long double must be either IBM 128-bit or IEEE 128-bit"
20 #endif
22 void
23 dfoo (LDOUBLE *ldb1, double *db1)
25 *ldb1 = *db1;
28 LDOUBLE
29 dfoo2 (double *db1)
31 return *db1;
34 LDOUBLE
35 dfoo3 (double x)
37 return x;
40 void
41 ffoo (LDOUBLE *ldb1, float *db1)
43 *ldb1 = *db1;
46 LDOUBLE
47 ffoo2 (float *db1)
49 return *db1;
52 LDOUBLE
53 ffoo3 (float x)
55 return x;
58 /* { dg-final { scan-assembler "xxlxor" } } */