From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA1EF394FC04; Fri, 14 May 2021 16:11:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA1EF394FC04 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95870] [9/10 Regression] ICE (segmentation fault) in most_general_template(), in gcc/cp/pt.c Date: Fri, 14 May 2021 16:11:26 +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: 9.3.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 16:11:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95870 --- Comment #11 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:2f1bb00ba340e53663651be7874011fd54e1d085 commit r12-804-g2f1bb00ba340e53663651be7874011fd54e1d085 Author: Jason Merrill Date: Mon Apr 5 11:47:50 2021 -0400 c++: simplify enclosing_instantiation_of [PR95870] Comparing DECL_SOURCE_LOCATION like the GCC 11 patch for PR 95870 will = also work for user-defined functions, if we update their location when instantiating. Another option would be to use LAMBDA_EXPR_REGEN_INFO f= or lambdas, but this way is even simpler. gcc/cp/ChangeLog: PR c++/95870 * pt.c (enclosing_instantiation_of): Just compare DECL_SOURCE_LOCATION. (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.=