mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-20 19:01:12 +08:00
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
This commit is contained in:
parent
64b23c13dc
commit
b54eff8bb1
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -1437,6 +1437,9 @@ strip_typedefs (tree t, bool *remove_attributes)
|
||||
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:
|
||||
|
11
gcc/testsuite/g++.dg/template/typename21.C
Normal file
11
gcc/testsuite/g++.dg/template/typename21.C
Normal file
@ -0,0 +1,11 @@
|
||||
// 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;
|
Loading…
x
Reference in New Issue
Block a user