Commit 07874b24 by Jason Merrill Committed by Jason Merrill

re PR c++/60219 ([c++11] ICE invalid use of variadic template)

	PR c++/60219
	* pt.c (coerce_template_parms): Bail if argument packing fails.

From-SVN: r208003
parent 843633f8
2014-02-21 Jason Merrill <jason@redhat.com> 2014-02-21 Jason Merrill <jason@redhat.com>
PR c++/60219
* pt.c (coerce_template_parms): Bail if argument packing fails.
PR c++/60224 PR c++/60224
* decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init): * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
Don't get confused by a CONSTRUCTOR that already has a type. Don't get confused by a CONSTRUCTOR that already has a type.
......
...@@ -6808,6 +6808,8 @@ coerce_template_parms (tree parms, ...@@ -6808,6 +6808,8 @@ coerce_template_parms (tree parms,
/* Store this argument. */ /* Store this argument. */
if (arg == error_mark_node) if (arg == error_mark_node)
lost++; lost++;
if (lost)
break;
TREE_VEC_ELT (new_inner_args, parm_idx) = arg; TREE_VEC_ELT (new_inner_args, parm_idx) = arg;
/* We are done with all of the arguments. */ /* We are done with all of the arguments. */
......
// PR c++/60219
// { dg-require-effective-target c++11 }
template<typename..., int> void foo();
void bar()
{
foo<0>; // { dg-error "" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment