PR c++/70067
* tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
same type.
From-SVN: r233973
+2016-03-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/70067
+ * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
+ same type.
+
2016-03-03 Jason Merrill <jason@redhat.com>
* method.c (synthesized_method_walk): operator= can also be constexpr.
result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t),
remove_attributes),
fullname, typename_type, tf_none);
+ /* Handle 'typedef typename A::N N;' */
+ if (typedef_variant_p (result))
+ result = TYPE_MAIN_VARIANT (DECL_ORIGINAL_TYPE (TYPE_NAME (result)));
}
break;
case DECLTYPE_TYPE:
--- /dev/null
+// PR c++/70067
+// { dg-do compile { target c++98 } }
+
+template <class> struct A;
+template <class T> struct B { struct N { }; };
+template <class T> struct D: B<T> {
+ typedef typename D::N N;
+ A<N> *a;
+};
+
+D<int> d;