[Bug c++/89421] [9 Regression] ICE in retrieve_specialization, at cp/pt.c:1245
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421 Marek Polacek changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #4 from Marek Polacek --- We have 1235 /* Lambda functions in templates aren't instantiated normally, but through 1236 tsubst_lambda_expr. */ 1237 if (lambda_fn_in_template_p (tmpl)) 1238 return NULL_TREE; but since r266056 we allow lambdas in a template-parameter-list: --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2988,12 +2988,6 @@ begin_class_definition (tree t) if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t))) return error_mark_node; - if (processing_template_parmlist) -{ - error ("definition of %q#T inside template parameter list", t); - return error_mark_node; -} - /* According to the C++ ABI, decimal classes defined in ISO/IEC TR 24733 are passed the same as decimal scalar types. */ if (TREE_CODE (t) == RECORD_TYPE Jason, should we also return NULL_TREE for lambdas inside template parameter list (in retrieve_specialization)?
[Bug c++/89421] [9 Regression] ICE in retrieve_specialization, at cp/pt.c:1245
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421 Jakub Jelinek changed: What|Removed |Added Priority|P3 |P1
[Bug c++/89421] [9 Regression] ICE in retrieve_specialization, at cp/pt.c:1245
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421 Paolo Carlini changed: What|Removed |Added CC||paolo.carlini at oracle dot com --- Comment #3 from Paolo Carlini --- Ah, yesterday I saw something which seems closely related (I will double check) but for *valid* code. This: template class T;
[Bug c++/89421] [9 Regression] ICE in retrieve_specialization, at cp/pt.c:1245
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- The ICE is on 1245 tree class_template = CLASSTYPE_TI_TEMPLATE (DECL_CONTEXT (tmpl)); (gdb) p tmpl $1 = where DECL_CONTEXT is on which CLASSTYPE_TEMPLATE_INFO is NULL. Note, there is another ICE, debug_tree (tmpl) ICEs on: #1 0x009aa1d1 in dump_template_decl (pp=0x2f5fde0 , t=, flags=128) at ../../gcc/cp/error.c:1396 1396 gcc_assert (TREE_CODE (TREE_TYPE (t)) == TEMPLATE_TEMPLATE_PARM); because TREE_TYPE (t) is a METHOD_TYPE rather than TEMPLATE_TEMPLATE_PARM.
[Bug c++/89421] [9 Regression] ICE in retrieve_specialization, at cp/pt.c:1245
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-02-20 CC||mpolacek at gcc dot gnu.org Target Milestone|--- |9.0 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- r266056.