On Fri, Mar 4, 2016 at 8:06 AM, Jason Merrill <ja...@redhat.com> wrote: > On this testcase, when strip_typedefs rebuilds a TYPENAME_TYPE to remove the > typedef, in this case it looks up the same typedef and we then abort because > we still have a typedef. In that case, strip the typedef explicitly. > > Tested x86_64-pc-linux-gnu, applying to trunk and 5.
I checked this into trunk for: ERROR: g++.dg/template/typename21.C -std=c++11: syntax error in target selector "target c++98" for " dg-do 2 compile { target c++98 } " ERROR: g++.dg/template/typename21.C -std=c++14: syntax error in target selector "target c++98" for " dg-do 2 compile { target c++98 } " ERROR: g++.dg/template/typename21.C -std=c++98: syntax error in target selector "target c++98" for " dg-do 2 compile { target c++98 } " Will backport to 5 if needed. -- H.J. Index: ChangeLog =================================================================== --- ChangeLog (revision 233974) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2016-03-04 H.J. Lu <hongjiu...@intel.com> + + * g++.dg/template/typename21.C: Replace c++98 with c++98_only. + 2016-03-04 David Malcolm <dmalc...@redhat.com> PR c/68187 Index: g++.dg/template/typename21.C =================================================================== --- g++.dg/template/typename21.C (revision 233974) +++ g++.dg/template/typename21.C (working copy) @@ -1,5 +1,5 @@ // PR c++/70067 -// { dg-do compile { target c++98 } } +// { dg-do compile { target c++98_only } } template <class> struct A; template <class T> struct B { struct N { }; };