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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 336913848009 for ; Wed, 9 Jun 2021 15:12:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 336913848009 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-37-QkSOO6RmNq-N4DZWvpJYSQ-1; Wed, 09 Jun 2021 11:11:59 -0400 X-MC-Unique: QkSOO6RmNq-N4DZWvpJYSQ-1 Received: by mail-wr1-f72.google.com with SMTP id k11-20020adfe3cb0000b0290115c29d165cso10895486wrm.14 for ; Wed, 09 Jun 2021 08:11:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PkuVNEm1BeYl9U4WlWavmN73o9HGKMGU/WLVgwuQnVQ=; b=FVaOXq3ZoiZnV9MvpC/nPoaMr9vbF5F2QKaLv4q0Oh+jXhmXFWm841r+tEbw/lwQKi l4b2SimMVPnUPGZGYKCeMU0yudSLnDpz2g9IoomB7eIBMJT0d+HGM2h2HgsX/9atjyAF tYdQXQkHshAZeR8JjbW2jwYP9rMVrfC33XTa0sK5NXQ/6YoIq7n4MTJy3wnA3uqTIyky cvYSLiaOLW8OYQXzkNPfyXCI4CQWR4i38z3oeUDf5ndhCijGuIUegAMkPD++IO49D2gr Tm/scwvzXeYplF2M/063WIsZiNHCk104Lf6/EgZZ6mPQbdZdCOrd81f29kcXmhWoizGK ef8A== X-Gm-Message-State: AOAM530AdpHel+nP4sHPfssAM7VNBntqs7E4V30kCChHLYOyoY6Dk7CS iTx72isqOBBWGgjqZaj//eUjCPDtx3zrFWRQtpZAea4NfF8mSyIWc4wWdGM9eRh2p93r137PFfP HSi+QAKN2Zt02c6S8xKls9Lf6G5UQPmI= X-Received: by 2002:a5d:5049:: with SMTP id h9mr284880wrt.221.1623251518547; Wed, 09 Jun 2021 08:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqg3jG+g3u2tPXnnVWQfNcYAzHGOBqwoz3SCvI+EeKBYQ7vcv0M1LWvhpimRAPR4NK3wLURMabNQ0Y+UaiSyI= X-Received: by 2002:a5d:5049:: with SMTP id h9mr284842wrt.221.1623251518198; Wed, 09 Jun 2021 08:11:58 -0700 (PDT) MIME-Version: 1.0 References: <20210607220207.944400-1-rodgert@appliantology.com> <20210608002843.945023-1-rodgert@appliantology.com> In-Reply-To: From: Jonathan Wakely Date: Wed, 9 Jun 2021 16:11:47 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Fix Wrong param type in :atomic_ref<_Tp*>::wait [PR100889] To: Thomas Rodgers Cc: Christophe Lyon , gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 15:12:02 -0000 For other tests that don't link to libatomic we use if-constexpr to limit which types we test e.g. --- a/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc @@ -33,14 +33,17 @@ template S aa{ va }; S bb{ vb }; std::atomic_ref a{ aa }; - a.wait(bb); - std::thread t([&] + if constexpr (std::atomic_ref::is_always_lock_free) { - a.store(bb); - a.notify_one(); - }); - a.wait(aa); - t.join(); + a.wait(bb); + std::thread t([&] + { + a.store(bb); + a.notify_one(); + }); + a.wait(aa); + t.join(); + } } int Alternatively we could add arm*-*-* to the targets in add_options_for_libatomic in testsuite/lib/dg-options.exp