PR c++/78649
* pt.c (tsubst_init): Don't call build_value_init if decl's type
is error_mark_node.
* g++.dg/cpp0x/pr78649.C: New test.
From-SVN: r243204
+2016-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78649
+ * pt.c (tsubst_init): Don't call build_value_init if decl's type
+ is error_mark_node.
+
2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com>
init = tsubst_expr (init, args, complain, in_decl, false);
- if (!init)
+ if (!init && TREE_TYPE (decl) != error_mark_node)
{
/* If we had an initializer but it
instantiated to nothing,
+2016-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/78649
+ * g++.dg/cpp0x/pr78649.C: New test.
+
2016-12-02 Uros Bizjak <ubizjak@gmail.com>
PR target/70322
--- /dev/null
+// PR c++/78649
+// { dg-do compile { target c++11 } }
+
+template <class> void foo ();
+template <class T, class... U>
+void
+test ()
+{
+ T t (foo<U>...); // { dg-error "declared void" }
+}
+
+int
+main ()
+{
+ test<void> ();
+}