===================================================================
@@ -8547,6 +8547,8 @@ lookup_template_class_1 (tree d1, tree arglist, tr
arglist, complain, NULL_TREE);
--processing_template_decl;
TREE_VEC_LENGTH (arglist)++;
+ if (partial_inst_args == error_mark_node)
+ return error_mark_node;
use_partial_inst_tmpl =
/*...and we must not be looking at the partial instantiation
itself. */
===================================================================
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++11 } }
+
+template <typename> struct A {
+ template <typename, > struct __construct_helper; // { dg-error "expected" }
+ template <typename... _Args>
+ using __has_construct typename __construct_helper<_Args...>::type; // { dg-error "expected" }
+} struct : A<int> { // { dg-error "expected" }