Hi Mike, On Tue, Jun 05, 2018 at 06:47:52PM -0400, Michael Meissner wrote: > With this fix, the compiler no longer raises an internal error if you use > explicit overloading of __ibm128 and long double. Instead it generates the > expected error: > > foo01.C:33:15: error: 'bool foo::iszero(long double)' cannot be overloaded > with 'bool foo::iszero(long double)' > inline bool iszero (__ibm128 i128) { return i128 == 0.0; } > ^~~~~~ > foo01.C:32:15: note: previous declaration 'bool foo::iszero(long double)' > inline bool iszero (long double ld) { return ld == 0.0; }
Excellent. > --- gcc/config/rs6000/rs6000.c (revision 261175) > +++ gcc/config/rs6000/rs6000.c (working copy) > @@ -16383,14 +16383,21 @@ rs6000_init_builtins (void) > __ieee128. */ > if (TARGET_FLOAT128_TYPE) > { > - ibm128_float_type_node = make_node (REAL_TYPE); > - TYPE_PRECISION (ibm128_float_type_node) = 128; > - SET_TYPE_MODE (ibm128_float_type_node, IFmode); > - layout_type (ibm128_float_type_node); > + if (TARGET_IEEEQUAD || !TARGET_LONG_DOUBLE_128) > + { > + ibm128_float_type_node = make_node (REAL_TYPE); > + TYPE_PRECISION (ibm128_float_type_node) = 128; > + SET_TYPE_MODE (ibm128_float_type_node, IFmode); > + layout_type (ibm128_float_type_node); > + } > + else > + ibm128_float_type_node = long_double_type_node; > + > lang_hooks.types.register_builtin_type (ibm128_float_type_node, > "__ibm128"); > > - ieee128_float_type_node = float128_type_node; > + ieee128_float_type_node > + = TARGET_IEEEQUAD ? long_double_type_node : float128_type_node; > lang_hooks.types.register_builtin_type (ieee128_float_type_node, > "__ieee128"); > } Should we use float128_type_node at all anymore, btw? Okay for trunk, and later for 8, but please test on BE and p9. Segher