[Bug c++/84720] [7/8 Regression] internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in decl_anon_ns_mem_p, at cp/tree.c:3472

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 6 12:30:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84720

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
clang++ accepts this.
In tsubst_function_decl we set DECL_CONTEXT to error_mark_node as that is what
12520     if (member && !closure)
12521       ctx = tsubst_aggr_type (ctx, args,
12522                               complain, t, /*entering_scope=*/1);
returns (complain is tf_none), returning error_mark_node here if ctx is
error_mark_node doesn't help, it ICEs later on elsewhere.


More information about the Gcc-bugs mailing list