PR c++/59347
* pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
erroneous typedef.
From-SVN: r208025
2014-02-21 Jason Merrill <jason@redhat.com>
+ PR c++/59347
+ * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
+ erroneous typedef.
+
PR c++/60241
* pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
of the partial instantiation, not the most general template.
tree type = NULL_TREE;
bool local_p;
+ if (TREE_TYPE (t) == error_mark_node)
+ RETURN (error_mark_node);
+
if (TREE_CODE (t) == TYPE_DECL
&& t == TYPE_MAIN_DECL (TREE_TYPE (t)))
{
--- /dev/null
+// PR c++/59347
+
+template<int> struct A
+{
+ typedef int ::X; // { dg-error "" }
+};
+
+A<0> a;