* error.c (find_typenames_r): Also stop on EXPR_PACK_EXPANSION.
From-SVN: r257875
+2018-02-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/84454 - ICE with pack expansion in signature.
+ * error.c (find_typenames_r): Also stop on EXPR_PACK_EXPANSION.
+
2018-02-20 Siddhesh Poyarekar <siddhesh@sourceware.org>
* cp-objcp-common.c (cxx_block_may_fallthru): Add case for
/* Add the typename without any cv-qualifiers. */
mv = TYPE_MAIN_VARIANT (*tp);
- if (TREE_CODE (*tp) == TYPE_PACK_EXPANSION)
+ if (PACK_EXPANSION_P (*tp))
{
/* Don't mess with parameter packs since we don't remember
the pack expansion context for a particular typename. */
--- /dev/null
+// PR c++/84454
+// { dg-do compile { target c++11 } }
+
+template<class F, class... A>
+void
+g(F&&, A&&...)
+{}
+
+template<class... A>
+auto
+h(A&&... a) -> decltype(g(0, g<decltype(a)>(a)...))
+{
+ g(a...); // { dg-error "no match" }
+}
+
+int
+main()
+{
+ h();
+}