From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 23E53385772D for ; Tue, 30 Jan 2024 16:50:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 23E53385772D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 23E53385772D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706633418; cv=none; b=upDxZsog9KU+kpAz8qwetbTJ52lgbyfjLCGpzfonifGuQgSIPwagUpt3OeU8k+HpVSFeGbNV2af/Grd6GBHyJt5LFWLdbYLNIn12mcKze4qBxnUmlWjN63XfeNywvbtinshzzxHMSiw9KRjfjikESkTrs9iIjAzGHZZvtCCQ9ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706633418; c=relaxed/simple; bh=qIE9ZBn+0oN35s6C35dok3uFvwM6oKxq5bRlZ8tGb+k=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=XtB9Ir/HKX6mfWELC9rD84NaZyqekn/EMmaj1fU4lkPsqmxlwXEfoDvCHLwrBmSBeBEm2Us7nVnDPzHuaRJ7qrYXfRmRtmAE9Obbpbz1u9RoKGS7ySwM9c7SyaPrSgbH5OQ/ws+qvNtgyGi6S87wKuUjC5T37z6F4LunheK9DoM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706633416; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=Q8GlxudqHgzmp+BI1NiGC/v+e63Vnn4/BdZFWs+cpdw=; b=Gz+0RJc2N6s8s8C9UzPjej0DNV5MLGciUI2pokVAx8HkWU5we4xSXJa/UaexssuoqoE3b6 tSs5FCcrrdkqRdII0y/mHwUMiC2+VA3XN4eJAhN2hGDBIEvLucsWVO2wFjOY2ZA/1HmKyx o3YlBPeGnhM9557f7G6zCKCu7cg/mKk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-19--9kIW9_AMEybR34KorHi0Q-1; Tue, 30 Jan 2024 11:50:12 -0500 X-MC-Unique: -9kIW9_AMEybR34KorHi0Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A510B846D69; Tue, 30 Jan 2024 16:50:11 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71191200B25A; Tue, 30 Jan 2024 16:50:11 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 40UGo8a21635414 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 30 Jan 2024 17:50:09 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 40UGo82l1635413; Tue, 30 Jan 2024 17:50:08 +0100 Date: Tue, 30 Jan 2024 17:50:07 +0100 From: Jakub Jelinek To: Jonathan Wakely Cc: xndcn , Xi Ruoyao , "H.J. Lu" , GCC Patches , libstdc++@gcc.gnu.org Subject: Re: [PATCH] libstdc++: atomic: Add missing clear_padding in __atomic_float constructor Message-ID: Reply-To: Jakub Jelinek References: <9f2bdd3a973d98199bb5b322baa575ab2fba8a58.camel@xry111.site> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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::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