* pt.c (lookup_template_class_1): Don't try to enter the scope of an
alias template.
From-SVN: r246462
+2017-03-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/77339 - ICE with invalid use of alias template.
+ * pt.c (lookup_template_class_1): Don't try to enter the scope of an
+ alias template.
+
2017-03-24 Marek Polacek <polacek@redhat.com>
PR c++/80119
|| !PRIMARY_TEMPLATE_P (gen_tmpl)
|| currently_open_class (template_type))
{
- tree tinfo = TYPE_TEMPLATE_INFO_MAYBE_ALIAS (template_type);
+ tree tinfo = TYPE_TEMPLATE_INFO (template_type);
- if (comp_template_args (TI_ARGS (tinfo), arglist))
+ if (tinfo && comp_template_args (TI_ARGS (tinfo), arglist))
return template_type;
}
--- /dev/null
+// PR c++/77339
+// { dg-do compile { target c++11 } }
+
+template < typename > using A = int;
+
+//OK: template < typename X > A < X > a;
+template < typename X > A < X >::a; // { dg-error "" }