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 35920385828E for ; Sat, 21 Oct 2023 11:18:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 35920385828E 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 35920385828E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697887124; cv=none; b=peGXpCQhJ+ezOeougkhQZavTdynQJjXCIIGTBuSkScL2U9s21AggfCftJBTaQN1RzeULsIzWD+PVyS/com8sz4NAATC9MXhNMEF2B11bkghMzQ0hioHVBXwJ6mwa+YLbR21RdQSZNunt4C6wY0MLJlVW9iP8QcfCzm75kpOGEMg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697887124; c=relaxed/simple; bh=ssv42TKagIY+axaQlp6LhWH7jvM23zDR1gqawoJxZY0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=PX6KXoO1kvie7i7jKUZepBoX8wEZV+RdBCuvrFrIP5XmNCYGRibKRQHWtbn6jdzhlhEHhrmYrqLhH1QW8y4mUCLPVh4mEBckpKfoRfRwK3ASMEnT+h7Lvc67xEaoaDhxcWO10TEFtp90sD7K895mx5uSnkFx91vVT/x+Q5wT5jM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697887113; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K8b7taKGRrlIHZmbj0ntH/flK0CRaXdMDA1aSLQ+pGU=; b=LOTVXvJ43zMVvHIAA2fyGXzMbTRnyz7I+0nmyg9mIQWJs8TKhUpUE+6+jCeaKFL+PPVdwb HFz6Y55ggyCZlJhyBmLzYmNJN9kEDUOwbvj7LW7bcn52HG1k7tsBRVPZvTLekVYXbJ72Ev ygy6c6xqr62cCSuuA9SWS/j+X9Dk0Qo= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-384-fyHqYydfPbybNNdLV-WamA-1; Sat, 21 Oct 2023 07:18:32 -0400 X-MC-Unique: fyHqYydfPbybNNdLV-WamA-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2c520e0a9a7so16454661fa.3 for ; Sat, 21 Oct 2023 04:18:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697887111; x=1698491911; h=content-transfer-encoding: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=K8b7taKGRrlIHZmbj0ntH/flK0CRaXdMDA1aSLQ+pGU=; b=WRQVq8wsUBPgFnle347wmicaNAn/LCg6eDbpxNB94YyLS8XvM84bpG0DhZ3KvX5kBK /XdCCJRVrzNJ92XO9t9+XFKp50FBOYsBUCKmHsLJ8eGNNFW4DI30J+ExCMFtgx4OWvfT 5f3/PBIJ3c56hQCZnuCpD5MSBWyJfPOsjpo9EynZQYEO49+DSvEffA6WGKCPAxyTPHpc aKMJAvsGkozdZbbSck/C+MQB3T5KakU9dtXNYh5MfZtx+PdUzIEP7RdX/VotzHhEmXec TlOgAoM2BDcLniFX1urMgD03qPY9BRz6Imz9VOKU7WgsPZXNfMDAMEpJKfDNBZ4WzW6q uN5g== X-Gm-Message-State: AOJu0YxN7Qfo5fg5wf/vAxWmNE+7NMTn/JDOYLek8gYx7uAlUyKFGwlk uwhBq9i6qh+Oy++qBO1qpaRFl2N3/F5etgvNRlI+WhFfwmdNurekDd1qBzl+CNdkKe+JWgaulIa CaMG/DEQJnZ7wi4DDVfACw7RQsWt7e94KEataqy0= X-Received: by 2002:a2e:9613:0:b0:2c2:9810:3677 with SMTP id v19-20020a2e9613000000b002c298103677mr3180076ljh.6.1697887111086; Sat, 21 Oct 2023 04:18:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXCywp2RsnbbRBIop19cIQoRVn4PHLbOOAnfpxYmf2UgzPQZ0+c+T63QEBmHxuzvK9fH6fOjO6IxM6RF9aWqY= X-Received: by 2002:a2e:9613:0:b0:2c2:9810:3677 with SMTP id v19-20020a2e9613000000b002c298103677mr3180068ljh.6.1697887110768; Sat, 21 Oct 2023 04:18:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Sat, 21 Oct 2023 12:18:19 +0100 Message-ID: Subject: Re: [PATCH v2] libstdc++: Workaround for LLVM-61763 in ranges To: Benjamin Acker Brock Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, jwakely.gcc@gmail.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Sat, 21 Oct 2023 at 12:16, Jonathan Wakely wrote: > > On Mon, 16 Oct 2023 at 04:56, Benjamin Acker Brock w= rote: > > > > > I don't think this patch counts as legally significant, but if you co= ntribute again in future you should be aware of https://gcc.gnu.org/contrib= ute.html#legal and either complete the copyright assignment paperwork, or a= dd a DCO sign-off to the commit message. > > > > Thanks for the reminder. I just added a sign-off. > > Thanks. > > > > This should be a complete sentence, so capital letter and full stop. > > > > Fixed! > > I actually adjusted the ChangeLog further, to name the modified component= s: > > * include/std/ranges (zip_view, adjacent_view): Implement > workaround for LLVM-61763. > > This is the usual convention. > > Pushed to trunk now, thanks again for the fix! I'll backport this to the gcc-13 branch too. > > > > --- > > > > Signed-off-by: Benjamin Brock > > > > libstdc++-v3/ChangeLog: > > > > * include/std/ranges: Implement workaround for LLVM-61763 i= n > > zip_view and adjacency_view. > > > > --- > > > > diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std= /ranges > > index 1d529a886be..7893e3a84c9 100644 > > --- a/libstdc++-v3/include/std/ranges > > +++ b/libstdc++-v3/include/std/ranges > > @@ -4632,6 +4632,9 @@ namespace views::__adaptor > > class zip_view<_Vs...>::_Iterator > > : public __detail::__zip_view_iter_cat<_Const, _Vs...> > > { > > +#ifdef __clang__ // LLVM-61763 workaround > > + public: > > +#endif > > __detail::__tuple_or_pair_t > _Vs>>...> _M_current; > > > > constexpr explicit > > @@ -4652,11 +4655,13 @@ namespace views::__adaptor > > return input_iterator_tag{}; > > } > > > > +#ifndef __clang__ // LLVM-61763 workaround > > template > > requires (view<_Ws> && ...) && (sizeof...(_Ws) > 0) && is_object= _v<_Fp> > > && regular_invocable<_Fp&, range_reference_t<_Ws>...> > > && std::__detail::__can_reference > range_reference_t<_Ws>...>> > > friend class zip_transform_view; > > +#endif > > > > public: > > // iterator_category defined in __zip_view_iter_cat > > @@ -5327,6 +5332,9 @@ namespace views::__adaptor > > template > > class adjacent_view<_Vp, _Nm>::_Iterator > > { > > +#ifdef __clang__ // LLVM-61763 workaround > > + public: > > +#endif > > using _Base =3D __detail::__maybe_const_t<_Const, _Vp>; > > array, _Nm> _M_current =3D array, _Nm>(); > > > > @@ -5367,12 +5375,14 @@ namespace views::__adaptor > > > > friend class adjacent_view; > > > > +#ifndef __clang__ // LLVM-61763 workaround > > template > > requires view<_Wp> && (_Mm > 0) && is_object_v<_Fp> > > && regular_invocable<__detail::__unarize<_Fp&, _Mm>, > > range_reference_t<_Wp>> > > && std::__detail::__can_reference > _Mm>, > > > > range_reference_t<_Wp>>> > > friend class adjacent_transform_view; > > +#endif > > > > public: > > using iterator_category =3D input_iterator_tag; > >