From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by sourceware.org (Postfix) with ESMTPS id CC43938582B6 for ; Tue, 5 Dec 2023 04:39:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC43938582B6 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=protonmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CC43938582B6 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.70.43.22 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701751168; cv=none; b=f5lX8mTZ2yeczhIUi4/iMNrkeXaklz/2oiJL02IrF+JitNryTomHsmOWQoOmknRA14oTROiKA4Gzuk5pdD/4dnPNoBkFsZEmG539WgUqeIrJDmp909dghkS+Mu475CnIwFGg6XHowcvHZpfI1IJnZS06Vz3kxS/dxfJfklXAT6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701751168; c=relaxed/simple; bh=4vwNrpZIa3FRUnWsnY/dyfSrFNwWWDliRzl0MR68KcM=; h=DKIM-Signature:Date:To:From:Subject:Message-ID:MIME-Version; b=icdS6lWUAsHhOkbsIle3tzo73MpB/gqWw9x7tfLN20n/MJnTL/+TjhehvsBQ2VsPV1/2Qi5dVUCWGX6fTH21wdfi8kXHlsn9PJl0VpRynTTB2e/OD+B+84WFQRJALOcPOjg4vpNmzxodUJfZEyU9STTwneYb2KqSE/AuPtoQzUg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1701751156; x=1702010356; bh=4vwNrpZIa3FRUnWsnY/dyfSrFNwWWDliRzl0MR68KcM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=XNgKpaXMNhNmX/LhnKcUONApCowRhI/U4X/6ETAMDHAGvft4h0RXzcbJKh5jlF0Ld hd79C4NE7tUVDr3dURh+MTwkqAPrRqSigECNsbwY4KZBgFbMv95/313cAfk49nKj5m 9LMYRIIMgayZ8okorOMeD0ZRqyvgUQtWI5/RBPANv85hlEv2zomIl5WrYxq6Gc7cBo DT4D6V6WZCD/5Po2HDgKKso/9o5B+qjCYKUMhF197YJFP1SEu9Y91R8F1lIDtd6BG4 Z02KVyXdSgnyUNMH3+AO3DuraeyEM5BbyoEXEuLwczlt7G89qp3dw5KpZjM2J9kmeg fyK+H/8QAshAQ== Date: Tue, 05 Dec 2023 04:39:09 +0000 To: Jason Merrill From: waffl3x Cc: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609] Message-ID: <59LofhYhxl7MLEuElXwZcESRB6MpjdG-iq-89B63siDRo5k0j-y6z-PVa6Y3iE1xE5LkJwpwTFi82bd0RZjB1yZbSJptFdPTBWfvOGj1W78=@protonmail.com> In-Reply-To: References: <_e1O52EjoN_BFiH31iHE-0eYegNJhoOdDN2O0mduqtMmt7qTGpRWgduxNppnO1si01rORJ470oWcoM-_lk1ICFo9lhe_ylBKQsJ791qMm_k=@protonmail.com> <1b3b0259-5ce4-4193-a36d-60f09e1c7c92@redhat.com> <575c0bbe-a3d6-4a54-b299-edff64df84b1@redhat.com> Feedback-ID: 14591686:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,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 Monday, December 4th, 2023 at 9:35 PM, waffl3x = wrote: >=20 >=20 > >> @@ -15402,6 +15450,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t= complain, >=20 > > > gcc_checking_assert (TYPE_MAIN_VARIANT (TREE_TYPE (ve)) > > > =3D=3D TYPE_MAIN_VARIANT (type)); > > > SET_DECL_VALUE_EXPR (r, ve); > > > + if (is_capture_proxy (t)) > > > + type =3D TREE_TYPE (ve); >=20 > > That should have close to the same effect as the lambda_proxy_type > > adjustment I was talking about, since that function basically returns > > the TREE_TYPE of the COMPONENT_REF. But the underlying problem is that > > finish_non_static_data_member assumes that 'object' is '*this', for > > which you can trust the cv-quals; for auto&&, you can't. > > capture_decltype has the same problem. I'm attaching a patch to address > > this in both places. >=20 >=20 > Regarding this, was my change actually okay, and was your change > supposed to address it? I applied my patch to the latest commit in > master yesterday and started tests and whatnot with this change > commented out as I wasn't sure. It seems like my tests for constness of > captures no longer works with or without this change commented out. >=20 > If you wish I can go over everything again and figure out a new > solution with your changes but stepping through all this code was quite > a task that I'm weary of doing again. Even if the second time through > won't be so arduous I would like to avoid it. >=20 > You know what, I'll give it a go anyway but I don't want to spend too > much time on it, I still have a few tests to clean up and this crash to > fix. >=20 > template void f() >=20 > { > int i; > [=3D](this T&& self){ return i; }(); // error, unrelated > } > int main() { f(); } >=20 >=20 > If this crash doesn't take too long (I don't think it will, it seems > straightforward enough) then I'll look at fixing the captures with a > const xobject parameter bug the correct way. >=20 > Alex WAIT Scratch that, I made a mistake, there's only a single case that is broken, I read the test log wrong. Ah, I swear I'm cursed to realize things the moment I hit the send button. I have to take a closer look, I'll get back to you when I know more, just trying to make sure you don't waste your time on this due to my mistake. Alex