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.133.124]) by sourceware.org (Postfix) with ESMTPS id 753043851155 for ; Mon, 31 Oct 2022 17:06:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 753043851155 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667235967; h=from:from: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=HSFLaWrgBq0TDKZozlANmLXxO0sB+FKn+6EeEC5AAwM=; b=KerDIXhQtXH/uCV217dV8TW37PLu7Dl3QzlyihMiICIBvTT5PT3/4FR7raN9qxrCzjWVgC zWx5IjPos6lmPekQdpKrYmusf0WcJRx597QhhOxgcfnja1dGK5DMJJV2yctEhRdVTFlTs+ i12C/JwTeggwFJa7IoNNxH/99EN+svM= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-526-GwRCyJ93M1SMjWE9E_LwTw-1; Mon, 31 Oct 2022 13:06:05 -0400 X-MC-Unique: GwRCyJ93M1SMjWE9E_LwTw-1 Received: by mail-ej1-f71.google.com with SMTP id hq18-20020a1709073f1200b007ade8dd3494so119504ejc.2 for ; Mon, 31 Oct 2022 10:06:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HSFLaWrgBq0TDKZozlANmLXxO0sB+FKn+6EeEC5AAwM=; b=1qBFaPl1indN9tCdkre13HM5BhBaFcQPfM9Tx+vTk15YVLsaBc2rCHjAGnQlglebBa Z1KaKVoY3lkHI/JN8Uj3tFxOmv3aA0WlwetO53BzM5avUUblRp4/R3Q6aXxkOYeSthy9 ayzBALEp6dh5846/0I7mzjv/Lui2iEefb76542yGHXaijYswpW3sDoKf4XpLhTZx3S1q WuA8cattrRlcFL+UXFKcfe+fjzBG3n/vCVvnvUOiib3+WGblfmRX9fLyCpTWprjqUDSL NmVE9nXqQjKaikQFAz3/qoJRPrhz0i1uC6XJ9l7fIUn49sGQVg5QzS6MS7TXRq99hJk7 H6zg== X-Gm-Message-State: ACrzQf3mRJTKhn/vCWMw93J7PeKb+dtatM3oKw+3OAqb1lq+smrLjcsH otehQUvizomwNhJtQSSL6QRzqBefpOLg75+lH+AuSpEMLWqs6z4j7RovuQ0yQC16W5gNuLgHELT 15DMgq+Rr6dpezjPVO15wvqe6HaExlKI= X-Received: by 2002:a17:906:fe46:b0:73d:939a:ec99 with SMTP id wz6-20020a170906fe4600b0073d939aec99mr14094700ejb.169.1667235964689; Mon, 31 Oct 2022 10:06:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4KjYQ/uuVwKCyMEjN/tMgrXFAoWDRU5oLjvnqceylICw/GN2VwZg0xUhBZ3dzuGVz415Fmtf6mIS4cPbZaovU= X-Received: by 2002:a17:906:fe46:b0:73d:939a:ec99 with SMTP id wz6-20020a170906fe4600b0073d939aec99mr14094682ejb.169.1667235964481; Mon, 31 Oct 2022 10:06:04 -0700 (PDT) MIME-Version: 1.0 References: <20220916202127.579816-1-jwakely@redhat.com> <5772422.MhkbZ0Pkbq@fomalhaut> <8176183.NyiUUSuA9g@fomalhaut> In-Reply-To: <8176183.NyiUUSuA9g@fomalhaut> From: Jonathan Wakely Date: Mon, 31 Oct 2022 17:05:53 +0000 Message-ID: Subject: Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham 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 Mon, 31 Oct 2022 at 17:03, Eric Botcazou 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.