This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/84925] [8 Regression] ICE with segfault in __PRETTY_FUNCTION__


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]