[Bug c++/95870] [9/10 Regression] ICE (segmentation fault) in most_general_template(), in gcc/cp/pt.c
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 14 16:11:26 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95870
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:2f1bb00ba340e53663651be7874011fd54e1d085
commit r12-804-g2f1bb00ba340e53663651be7874011fd54e1d085
Author: Jason Merrill <jason@redhat.com>
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 for
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.
More information about the Gcc-bugs
mailing list