diff mbox

C++ PATCH for c++/70067 (ICE with typename typedef)

Message ID CAMe9rOqvWY=MbN7G9CpFiaOPHbjwO9=nLo3aTSdVGd-0Tdfzow@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu March 4, 2016, 7:43 p.m. UTC
On Fri, Mar 4, 2016 at 8:06 AM, Jason Merrill <jason@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.

Comments

Jason Merrill March 4, 2016, 7:47 p.m. UTC | #1
c++98_only is wrong, we should just remove the target specifier.

Jason
H.J. Lu March 4, 2016, 7:54 p.m. UTC | #2
On Fri, Mar 4, 2016 at 11:47 AM, Jason Merrill <jason@redhat.com> wrote:
> c++98_only is wrong, we should just remove the target specifier.
>
> Jason

Tested with trunk and 5.  Done.
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog (revision 233974)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@ 
+2016-03-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+ * g++.dg/template/typename21.C: Replace c++98 with c++98_only.
+
 2016-03-04  David Malcolm  <dmalcolm@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 { }; };