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 593243858403 for ; Fri, 2 Feb 2024 20:36:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 593243858403 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 593243858403 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=1706906165; cv=none; b=MLr42fWjKki/hW1KiF7g4yJdaf3zxeDf/n/ka3e6336UuLUbJAklJ3TZ3Wq7sbzARSBzh3cndhqlZ8Cmkl8zMpCmWf3Yz50u/HY8oWgMByoCHVyjYrrWY9TCAOo+wbK8tgpPm7VE5AxdFgdSwQuOesleI3eEaR50AqTjc+8fq0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706906165; c=relaxed/simple; bh=lOF7sxD1n8HEroL7muqEtQoitfystBTKGYKnFlGzhuc=; h=DKIM-Signature:From:Date:To:Subject:Message-ID:MIME-Version; b=AFJpSE5IIzwGikUG+KTL1D4er0XwDV3eVNui5//pFPq2dIimloimsmbi0E5E8AmqpZ95QwGSJlRJ+EjoMeRE9+90UQZv+Vd54UxyGo6SJG9KvOAjWTxA/dRogZHRRo34idcCYn+SMz9fuBGKciZEvczP1O1g8d2P6BHzCg3NJX0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706906163; 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=c10d2neJxs0ZbZ5LFuYk25ph+yePYvOBi7hj29C58TE=; b=dsKfnpw2abWTmFZeSU8sViy+saAoNrfoXRzUOsuufF63qN6UacwfJR5qvVmSznBi+Udc3P 1Qe8A0OhPnpDQSlaa/NuGDxuetCpvRaEKlM2nkmdr7ZOsbu6Fh/+MHJ1JR3F8s0vjCMDZR A+LL068Zx9ZsrCJndhsUt1bt/2oani8= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-346-k-yHh0wuNCyIf6xDbZOngQ-1; Fri, 02 Feb 2024 15:36:01 -0500 X-MC-Unique: k-yHh0wuNCyIf6xDbZOngQ-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7831aaa797aso208709185a.1 for ; Fri, 02 Feb 2024 12:36:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706906161; x=1707510961; h=mime-version:references:message-id:in-reply-to:subject:cc:to:date :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c10d2neJxs0ZbZ5LFuYk25ph+yePYvOBi7hj29C58TE=; b=TtSJb0DbbuW8P5MjS56b5XXzgecxTej4n7eUMMQ0b9oXh/GeaKlQ0Y/D3pUTrq0MxY 6G7dj8U2Y5p8NMnuwVe9P5pSMU26Mu82psMiVMKMYQEJZ4zasR9QgMptZ56KN3o7nfKQ bzmlOi1jSbA/PA/kbFh+Mh/EJHng1FXo2PvmbNGTfZRUAhHiC5jb1W0MCqmPZxCuzamz 4Mg7fZ+eVHvRO5Lle7hcY53/sZM1ta/MZm3/0EwPrqtv7zXJZOCyqPaME8PI1oaj27SD d7jSFSM0s8rOj+kNrK1e7YYxMyJ8K2wMunpL4HvM/ATlC7IrOqREOMbLelVhx3SuzkUT vMlg== X-Gm-Message-State: AOJu0Yz8mhi+ZWNBAstdisqVsvLQ2DyBxeoay62KtZOzZy73KLnmLWbv 1qwm1QTuQxFMx6caTHwrSV+0ZUER9Bk7h254BHFUnPU7t/Kwpgm8JxPEea/SnyfEJWVPGDaxNhB q0nSs2hEYp6gQdfKD6884qY1oAUczT+eonhrbmKE2cMbdBs0Rtwlg8DM= X-Received: by 2002:ae9:c11a:0:b0:785:3e6e:77e5 with SMTP id z26-20020ae9c11a000000b007853e6e77e5mr4767985qki.30.1706906161510; Fri, 02 Feb 2024 12:36:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOoDNcX5cTXVbvtQCH7zNHiT1huuU2RaDrm8kr2S8iuXVscbeW0vNedjYEBsbhjxefmiOLFA== X-Received: by 2002:ae9:c11a:0:b0:785:3e6e:77e5 with SMTP id z26-20020ae9c11a000000b007853e6e77e5mr4767971qki.30.1706906161270; Fri, 02 Feb 2024 12:36:01 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUKeBmH9p1IxOILz/e/h7Yp+JKyiaPGmPH6Yi1oooQKu4aTONnMennEpx62g5fTA+inNtv2p6DMPv3Pj3bKfbLl+OXtY8Awjw== Received: from [192.168.1.130] (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id f4-20020a05620a15a400b00783da2644besm940893qkk.136.2024.02.02.12.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 12:36:00 -0800 (PST) From: Patrick Palka X-Google-Original-From: Patrick Palka Date: Fri, 2 Feb 2024 15:36:00 -0500 (EST) To: Jason Merrill cc: Patrick Palka , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769] In-Reply-To: Message-ID: <5f06be77-2314-65e4-a242-b84059bebfbe@idea> References: <20240202194104.317982-1-ppalka@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-8.9 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_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, 2 Feb 2024, Jason Merrill wrote: > On 2/2/24 14:41, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this > > look OK for trunk? > > > > -- >8 -- > > > > In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially > > substitute into a requires-expression so as to avoid checking its > > requirements out of order during e.g. generic lambda regeneration. > > > > Unfortunately we still do need to partially substitute into a > > requires-expression in rare cases, in particular when it's used in > > associated constraints that we are directly substituting for sake of > > declaration matching or dguide constraint rewriting. We can identify > > this situation by checking processing_constraint_expression_p, so this > > patch uses this predicate to control whether we defer substitution or > > partially substitute. The entering_scope=true change in tsubst_baselink > > is needed to avoid ICEing from tsubst_baselink during name lookup when > > rewriting std::ranges::ref_view's dguide constraints. > > Actually, I don't think we want to enter the scope when rewriting constraints. > Would tsubst_scope work instead? Oops yes, because of the maybe_dependent_member_ref stuff, the handling for which doesn't trigger here for some reason. Ah, I think it's because the tf_dguide flag gets dropped during tsubst_requires_expr since it uses tf_none rather than complain & ~tf_warning_or_error which would preserve special tsubst flags such as tf_dguide. I'll fix... > > Jason > >