public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Eric Botcazou <botcazou@adacore.com>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref
Date: Tue, 1 Nov 2022 13:53:46 +0000	[thread overview]
Message-ID: <CACb0b4kRt=rjcKzFym8DZbHkZ1T5we8MiTQf6UMqgHWb5VWw1A@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4mCn-1vDJxpkH04gLM250=6WxUsjHofFw2qOsqyjZOAaQ@mail.gmail.com>

On Mon, 31 Oct 2022 at 17:05, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Mon, 31 Oct 2022 at 17:03, Eric Botcazou <botcazou@adacore.com> wrote:
> >
> > > I suppose we could use memcmp on the as variable itself, to inspect
> > > the actual stored padding rather than the returned copy of it.
> >
> > Yes, that's probably the only safe stance when optimization is enabled.
>
>
> Strictly speaking, it's not safe, because it's undefined to use memcmp
> on an object of a non-trivial type. But it should work.

Do those loads still get scalarized at -O0?


  reply	other threads:[~2022-11-01 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 20:21 Jonathan Wakely
2022-10-31 15:34 ` Eric Botcazou
2022-10-31 15:37   ` Jonathan Wakely
2022-10-31 17:03     ` Eric Botcazou
2022-10-31 17:05       ` Jonathan Wakely
2022-11-01 13:53         ` Jonathan Wakely [this message]
2022-11-01 15:26           ` Eric Botcazou
2023-09-01 15:21   ` Jonathan Wakely
2023-09-01 18:14     ` Eric Botcazou

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='CACb0b4kRt=rjcKzFym8DZbHkZ1T5we8MiTQf6UMqgHWb5VWw1A@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=botcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@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).