Commit b54eff8b by Jason Merrill Committed by Jason Merrill

re PR c++/70067 (internal compiler error: in strip_typedefs, at cp/tree.c:1466)

	PR c++/70067

	* tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
	same type.

From-SVN: r233973
parent 64b23c13
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> 2016-03-03 Jason Merrill <jason@redhat.com>
* method.c (synthesized_method_walk): operator= can also be constexpr. * method.c (synthesized_method_walk): operator= can also be constexpr.
......
...@@ -1437,6 +1437,9 @@ strip_typedefs (tree t, bool *remove_attributes) ...@@ -1437,6 +1437,9 @@ strip_typedefs (tree t, bool *remove_attributes)
result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t), result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t),
remove_attributes), remove_attributes),
fullname, typename_type, tf_none); 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; break;
case DECLTYPE_TYPE: case DECLTYPE_TYPE:
......
// 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment