https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99708
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So what about: --- gcc/config/rs6000/rs6000-c.cc.jj 2022-02-17 10:24:16.756113275 +0100 +++ gcc/config/rs6000/rs6000-c.cc 2022-03-03 19:06:25.771981905 +0100 @@ -584,6 +584,10 @@ rs6000_target_modify_macros (bool define rs6000_define_or_undefine_macro (true, "__float128=__ieee128"); else rs6000_define_or_undefine_macro (false, "__float128"); + if (ibm128_float_type_node != ieee128_float_type_node && define_p) + rs6000_define_or_undefine_macro (true, "__SIZEOF_FLOAT128__=16"); + else + rs6000_define_or_undefine_macro (false, "__SIZEOF_FLOAT128__"); } /* OPTION_MASK_FLOAT128_HARDWARE can be turned on if -mcpu=power9 is used or via the target attribute/pragma. */ @@ -623,11 +627,9 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi if (TARGET_FRSQRTES) builtin_define ("__RSQRTEF__"); if (TARGET_FLOAT128_TYPE) - builtin_define ("__FLOAT128_TYPE__"); - if (ibm128_float_type_node) + builtin_define ("__FLOAT128_TYPE__"); + if (ibm128_float_type_node != ieee128_float_type_node) builtin_define ("__SIZEOF_IBM128__=16"); - if (ieee128_float_type_node) - builtin_define ("__SIZEOF_FLOAT128__=16"); #ifdef TARGET_LIBC_PROVIDES_HWCAP_IN_TCB builtin_define ("__BUILTIN_CPU_SUPPORTS__"); #endif ?