/cp
2018-02-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84350
* pt.c (do_auto_deduction): Don't check the TREE_TYPE of a null
init, early return.
/testsuite
2018-02-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84350
* g++.dg/cpp0x/auto49.C: New.
From-SVN: r257666
+2018-02-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84350
+ * pt.c (do_auto_deduction): Don't check the TREE_TYPE of a null
+ init, early return.
+
2018-02-14 Nathan Sidwell <nathan@acm.org>
* decl2.c (mark_vtable_entries): Set input_location to decl's.
/* C++17 class template argument deduction. */
return do_class_deduction (type, tmpl, init, flags, complain);
- if (TREE_TYPE (init) == NULL_TREE)
+ if (init == NULL_TREE || TREE_TYPE (init) == NULL_TREE)
/* Nothing we can do with this, even in deduction context. */
return type;
+2018-02-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84350
+ * g++.dg/cpp0x/auto49.C: New.
+
2018-02-14 Nathan Sidwell <nathan@acm.org>
* g++.dg/template/instantiate5.C: Adjust required-from loc.
--- /dev/null
+// PR c++/84350
+// { dg-do compile { target c++11 } }
+
+template<typename... T> void foo(T... t)
+{
+ new auto(t...); // { dg-error "invalid use" }
+}
+
+void bar()
+{
+ foo();
+}