PR c++/85242 - ICE with class definition in template parm.

* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): False if
	processing_template_parmlist.

From-SVN: r259178
This commit is contained in:
Jason Merrill 2018-04-06 11:12:34 -04:00 committed by Jason Merrill
parent 0c923157ab
commit a82f886aa6
3 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2018-04-06 Jason Merrill <jason@redhat.com>
PR c++/85242 - ICE with class definition in template parm.
* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): False if
processing_template_parmlist.
PR c++/85240 - LTO ICE with using of undeduced auto fn.
* cp-gimplify.c (cp_genericize_r): Discard using of undeduced auto.

View File

@ -4719,7 +4719,8 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
entity with its own template parameter list, and which is not a
full specialization. */
#define PROCESSING_REAL_TEMPLATE_DECL_P() \
(processing_template_decl > template_class_depth (current_scope ()))
(!processing_template_parmlist \
&& processing_template_decl > template_class_depth (current_scope ()))
/* Nonzero if this VAR_DECL or FUNCTION_DECL has already been
instantiated, i.e. its definition has been generated from the

View File

@ -0,0 +1,8 @@
// PR c++/85242
namespace N
{
struct A {};
}
template<struct N::A {}> void foo(); // { dg-error "" }