commit 1555baa24f537d0e724c53845e7ba2881df7a77f
Author: Jason Merrill <jason@redhat.com>
Date: Fri Feb 21 01:05:42 2014 -0500
PR c++/60219
* pt.c (coerce_template_parms): Bail if argument packing fails.
@@ -6808,6 +6808,8 @@ coerce_template_parms (tree parms,
/* Store this argument. */
if (arg == error_mark_node)
lost++;
+ if (lost)
+ break;
TREE_VEC_ELT (new_inner_args, parm_idx) = arg;
/* We are done with all of the arguments. */
new file mode 100644
@@ -0,0 +1,9 @@
+// PR c++/60219
+// { dg-require-effective-target c++11 }
+
+template<typename..., int> void foo();
+
+void bar()
+{
+ foo<0>; // { dg-error "" }
+}