https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107665

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Strange.
When I try with a cross to powerpc64le-linux simplified:
namespace std
{
  template<typename T, T v> struct integral_constant {
    static constexpr T value = v;
  };
  typedef integral_constant<bool, false> false_type;
  typedef integral_constant<bool, true> true_type;
  template<class T, class U>
  struct is_same : std::false_type {};
  template <class T>
  struct is_same<T, T> : std::true_type {};
}

static_assert (std::is_same<decltype (0.0q), __float128>::value);
out of this, I get with any of
-std=gnu++23 -mlong-double-{64,128 -mabi={ieee,ibm}longdouble}
a successful compilation.
So, what type do you get instead?
static machine_mode
rs6000_c_mode_for_suffix (char suffix)
{
  if (TARGET_FLOAT128_TYPE)
    {
      if (suffix == 'q' || suffix == 'Q')
        return (FLOAT128_IEEE_P (TFmode)) ? TFmode : KFmode;

      /* At the moment, we are not defining a suffix for IBM extended double.
         If/when the default for -mabi=ieeelongdouble is changed, and we want
         to support __ibm128 constants in legacy library code, we may need to
         re-evalaute this decision.  Currently, c-lex.cc only supports 'w' and
         'q' as machine dependent suffixes.  The x86_64 port uses 'w' for
         __float80 constants.  */
    }

  return VOIDmode;
}   
should return TFmode or KFmode and the c-family code should prefer
float128t_type_node over float128_type_node for the q/w suffixes.

Reply via email to