| 1 |
// { dg-do compile { target { *-*-linux* } } } |
| 2 |
// { dg-require-effective-target ppc_float128_sw } |
| 3 |
// { dg-options "-mvsx -mfloat128 -O2 -mabi=ibmlongdouble -Wno-psabi" } |
| 4 |
|
| 5 |
// PR 85657 |
| 6 |
// Check that __ibm128 and long double can be used in the same template, |
| 7 |
// even if long double uses the IBM extended double representation. |
| 8 |
|
| 9 |
template <class __T> inline bool |
| 10 |
iszero (__T __val) |
| 11 |
{ |
| 12 |
return __val == 0; |
| 13 |
} |
| 14 |
|
| 15 |
int |
| 16 |
use_template (void) |
| 17 |
{ |
| 18 |
long double ld = 0.0; |
| 19 |
__ibm128 ibm = 0.0; |
| 20 |
|
| 21 |
__asm__ (" # %x0, %x1" : "+d" (ld), "+d" (ibm)); |
| 22 |
|
| 23 |
return iszero (ld) + iszero (ibm); |
| 24 |
} |