This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84925] [8 Regression] ICE with segfault in __PRETTY_FUNCTION__
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 17 Mar 2018 16:54:57 +0000
- Subject: [Bug c++/84925] [8 Regression] ICE with segfault in __PRETTY_FUNCTION__
- Auto-submitted: auto-generated
- References: <bug-84925-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84925
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12898,7 +12898,7 @@ enclosing_instantiation_of (tree otctx)
for (; flambda_count < lambda_count && fn && LAMBDA_FUNCTION_P (fn);
fn = decl_function_context (fn))
++flambda_count;
- if (DECL_TEMPLATE_INFO (fn)
+ if ((fn && DECL_TEMPLATE_INFO (fn))
? most_general_template (fn) != most_general_template (tctx)
: fn != tctx)
continue;
seems to DTRT.