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 7A990385842A for ; Tue, 1 Nov 2022 13:54:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A990385842A 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=1667310840; 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=tA1iLGDOKSum+BWwfnt6LH2HTt6SaezlZS0csf1Yi2s=; b=YXYnX7578NtQHiol82qaJw6sP0sEXjIAaEw5mlkpiAoKqnPmOpTxKjyheWbAPqZ5yZpYsi nmoVApCtSAZ2OIXprbVYDSGOBPwPv0GYGEUWf4+jrCKbB2htWaQRxJ2s3eD5m0eGyYkQ6O uPVpiK2NBfhAqVJpSvN9lgUuQJzhtHU= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-543-d-OYSW7xMAGGNPYbeqdHBw-1; Tue, 01 Nov 2022 09:53:58 -0400 X-MC-Unique: d-OYSW7xMAGGNPYbeqdHBw-1 Received: by mail-ej1-f70.google.com with SMTP id oz34-20020a1709077da200b007adc8d68e90so3672779ejc.11 for ; Tue, 01 Nov 2022 06:53:58 -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=tA1iLGDOKSum+BWwfnt6LH2HTt6SaezlZS0csf1Yi2s=; b=CFonDTbKy+eMfWayqN6RgTgInVnZR6AfhkQXAVgAP+5CVYphD3rZHtWiTIKqSd7WZb yl3f8zMcJ8j07cfHqF/HheDJaa2MYA6CfwkclM5EAQY7EmC6xOYwfujCawKOyy70QGP/ lxIAOyniIomlPUNOH32Td97TEHRfCBDt0tnqwHcv95XCkn/9dKIcUt8skk/6Fb1gLaaU ME38GtCCqdAltE+F/iqwrBYfHyN+NAaWn4nKEL7vxMf8qn99elxk2WVGbiyDVUU1Y+nn 0U82Ab4jBMv4Jvhu19q/ucjtskeUpqxxlg+BZR1/XxS4jHMbniGO6QavRWVPXrqG/h6t QfWw== X-Gm-Message-State: ACrzQf1DQNFVmzAkDayDWhShGxvEksMPefWvEl2jd8WdfzBOh+eWURGT mVrlAQ+mOsTi9W6GA3STJQfTJ7P2vZF1rNVp36/gemfm/felWl3r3K5kDDuYMjvIxqCxlYA4Y8m Nx8awI9mcCTOQ8gpaf3u53VfDb1SIGBg= X-Received: by 2002:a17:906:fe46:b0:73d:939a:ec99 with SMTP id wz6-20020a170906fe4600b0073d939aec99mr18554841ejb.169.1667310837812; Tue, 01 Nov 2022 06:53:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ACTcstXLf8dWDUDS0DxPjphuJYg5eRAaXNBfNZ+u4bP5tvoVe51w8MtGu1spigSiY7tgdYaHznNCVhy+GkeI= X-Received: by 2002:a17:906:fe46:b0:73d:939a:ec99 with SMTP id wz6-20020a170906fe4600b0073d939aec99mr18554818ejb.169.1667310837557; Tue, 01 Nov 2022 06:53:57 -0700 (PDT) MIME-Version: 1.0 References: <20220916202127.579816-1-jwakely@redhat.com> <5772422.MhkbZ0Pkbq@fomalhaut> <8176183.NyiUUSuA9g@fomalhaut> In-Reply-To: From: Jonathan Wakely Date: Tue, 1 Nov 2022 13:53:46 +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=-4.5 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=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 Mon, 31 Oct 2022 at 17:05, Jonathan Wakely wrote: > > 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. Do those loads still get scalarized at -O0?