public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107665] g++.dg/cpp23/ext-floating1.C fails after r13-3387-g79d38dd46e6b07
Date: Tue, 15 Nov 2022 14:27:38 +0000	[thread overview]
Message-ID: <bug-107665-4-tUMYs0OwRu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107665-4@http.gcc.gnu.org/bugzilla/>

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.

      parent reply	other threads:[~2022-11-15 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13  5:00 [Bug other/107665] New: [13 regression] " seurer at gcc dot gnu.org
2022-11-13  7:47 ` [Bug other/107665] " pinskia at gcc dot gnu.org
2022-11-15 14:27 ` jakub at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107665-4-tUMYs0OwRu@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).