From: Jakub Jelinek <jakub@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: xndcn <xndchn@gmail.com>, Xi Ruoyao <xry111@xry111.site>,
"H.J. Lu" <hjl.tools@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
libstdc++@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: atomic: Add missing clear_padding in __atomic_float constructor
Date: Tue, 30 Jan 2024 17:50:07 +0100 [thread overview]
Message-ID: <ZbkovwD5DX1g/osW@tucnak> (raw)
In-Reply-To: <CACb0b4k9Um7Q7dhS_zcN5ZtPOmEFxzu_aDcwE-OK4wjyc5+wKA@mail.gmail.com>
On Tue, Jan 30, 2024 at 04:34:30PM +0000, Jonathan Wakely wrote:
> > --- /dev/null
> > +++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/compare_exchange_padding.cc
> > @@ -0,0 +1,50 @@
> > +// { dg-do run { target c++20 } }
> > +// { dg-options "-O0" }
> > +// { dg-timeout 10 }
Why dg-timeout?
I don't see it used in any of the libstdc++ tests and I don't see anything
expensive on this test. Just leave it out.
> > +// { dg-additional-options "-mlong-double-80" { target x86_64-*-* } }
> > +// { dg-do run { target { ia32 || x86_64-*-* } } }
Also, the target selectors above look wrong.
Generally, one should use { i?86-*-* x86_64-*-* } because e.g. on some
OSes like Solaris, one builds i?86 compiler which supports -m32 or -m64
options.
I wouldn't add the -mlong-double-80 at all, it is an ABI changing option,
if you rely in the test on some 80-bit long double properties (but on which
ones? Sure, if -mlong-double-64 or -mlong-double-128 is in effect, the
type won't have any padding, but __builtin_clear_padding should reflect
that), it is better to guard the part of the test with some checks, whether
std::numeric_limits<long double>::digits == 64, or
preprocessor __LDBL_MANT_DIG__ == 64.
> > +// { dg-add-options libatomic_16b }
>
> Why not just use -latomic unconditionally here?
>
> You're adding a new libatomic_16b option that expands to -latomic for
> x86 and nothing otherwise, and then using it in a test that only runs
> for x86. So it's just adding -latomic to all targets that run the
> test, right?
>
> Also, this patch needs either a copyright assignment or a DCO sign-off:
> https://gcc.gnu.org/contribute.html#legal
And if somebody would need to commit it for you, also patch in non-garbled
state (e.g. sent as an attachment, or even compressed attachment if using
really bad MUAs).
Jakub
next prev parent reply other threads:[~2024-01-30 16:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJ=gGT3=TCsF2GcsawmbOReDjwVPmxpSLw1_CTZX5NE6HUtu+g@mail.gmail.com>
[not found] ` <CAMe9rOrm4=d5xkHeocOFNWf4=vUfwc_bzp4_zUt8j8+apcrWoA@mail.gmail.com>
[not found] ` <CAJ=gGT1LwAeKF6B5eNFBdKXzeK9Z1ubAwH-ykS_2X2Fc9t7-Ww@mail.gmail.com>
2024-01-16 10:12 ` Xi Ruoyao
2024-01-16 16:16 ` xndcn
2024-01-24 15:53 ` xndcn
2024-01-30 16:08 ` [PING][PATCH] " xndcn
2024-01-30 16:31 ` [PATCH] " Jonathan Wakely
2024-01-30 16:34 ` Jonathan Wakely
2024-01-30 16:50 ` Jakub Jelinek [this message]
2024-01-31 17:19 ` xndcn
2024-02-01 13:54 ` Jonathan Wakely
2024-02-02 16:52 ` xndcn
2024-02-16 12:38 ` Jonathan Wakely
2024-02-16 13:51 ` Jonathan Wakely
2024-02-16 14:10 ` Jakub Jelinek
2024-02-16 15:15 ` Jonathan Wakely
2024-03-14 15:13 ` Jonathan Wakely
2024-03-25 15:42 ` [PING][PATCH] " xndcn
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=ZbkovwD5DX1g/osW@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.org \
--cc=xndchn@gmail.com \
--cc=xry111@xry111.site \
/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).