From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BEFC3858426; Tue, 6 Jun 2023 00:18:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BEFC3858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686010736; bh=/d7FMJ0mBubbyun18V7Fb6MBunn8UUfFq6+nCmjzTIc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=brewkeqnS4jpZJ1jomJme243DDaOmMaJFdtNFg/w/bMpjsHnhWS64ZHotR8XAAd6r d7YlR7v0lvJasoRgUDq3SarLPdj+jMuTRstaDARHsE7VnaFHpFBCuxGCSa72y+Frye CmLnqeM6qJvaVHQ1qXpNqs/VA7EpvCMllX0KQOxQ= From: "waffl3x at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110122] [13/14 Regression] using an aggregate with a member variable with a user defined copy constructor in a class NTTP causes capture and use of the `this` pointer in a generic lambda to produce the following error "-copy ctor- used before its definition" Date: Tue, 06 Jun 2023 00:18:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: waffl3x at protonmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110122 --- Comment #3 from waffl3x --- Very cool, thanks, since your test case seems to cause problems in GCC 11 a= nd GCC 12 does that mean the bug goes deeper than I thought? (In reply to Patrick Palka from comment #2) > It seems only the first testcase exhibits a 13 regression, we never accep= ted > the second testcase. Is that what you meant here btw, that since your second test case triggers = the bug in 11 and 12 that it belongs as a different regression test? Sadly, the workaround doesn't work when `Bar` is a class template. https://godbolt.org/z/41xWrar5e So it doesn't work in my specific case :( I'm still very impressed that you found another way to trigger it as well a= s a workaround, it's just a shame I can't use it.=