Here an unexpanded parameter pack pass into asm_operand which doesn't
expect to see an operand without type. So use check_for_bare_parameter_packs
to remedy that.
gcc/cp/ChangeLog:
* parser.cc (cp_parser_asm_operand_list): Check for unexpanded
parameter packs.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/variadic-crash7.C: New test.
parens.require_open (parser);
/* Parse the expression. */
tree expression = cp_parser_expression (parser);
+ if (check_for_bare_parameter_packs (expression))
+ expression = error_mark_node;
+
/* Look for the `)'. */
parens.require_close (parser);
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+template <typename... Ts>
+void f (Ts&&... args)
+{
+ asm volatile ("" :: "r"(args) : "memory"); // { dg-error "parameter packs" }
+}
+
+void g()
+{
+ f(1);
+}