comparison gcc/testsuite/g++.dg/pr85657.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 // { dg-do compile { target { powerpc*-*-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 }