[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
--- Comment #3 from andreasmeier80 at gmx dot de 2009-03-27 07:20 --- Approved: http://gcc.gnu.org/ml/gcc-patches/2009-03/msg01084.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638
[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
--- Comment #4 from hjl at gcc dot gnu dot org 2009-03-27 13:36 --- Subject: Bug 38638 Author: hjl Date: Fri Mar 27 13:36:33 2009 New Revision: 145107 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=145107 Log: gcc/cp/ 2009-03-27 Andrew Pinski andrew_pin...@playstation.sony.com PR c++/38638 * parser.c (cp_parser_elaborated_type_specifier): If we have a typename tag and don't have either a TYPE_DECL or a TEMPLATE_ID_EXPR, set the type to NULL. gcc/testsuite/ 2009-03-27 Andrew Pinski andrew_pin...@playstation.sony.com PR c++/38638 * g++.dg/template/typename17.C: New testcase. * g++.dg/template/typename18.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/template/typename17.C trunk/gcc/testsuite/g++.dg/template/typename18.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638
[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-31 23:08 --- I think I have a simple parser fix for this. Index: parser.c === --- parser.c(revision 142986) +++ parser.c(working copy) @@ -11537,7 +11537,11 @@ cp_parser_elaborated_type_specifier (cp_ type = make_typename_type (parser-scope, decl, typename_type, /*complain=*/tf_error); - else + /* If the `typename' keyword is in effect and DECL is not a type decl. Then + type is non existant. */ + else if (tag_type == typename_type TREE_CODE (decl) != TYPE_DECL) + type = NULL_TREE; + else type = TREE_TYPE (decl); } But I need to check if we could get anything besides typedecl here really. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Last reconfirmed|2008-12-27 01:29:47 |2008-12-31 23:08:25 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638
[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638
[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638
[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
-- reichelt at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.2.5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638
[Bug c++/38638] [4.2/4.3/4.4 regression] ICE superfluous 'typename'
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-27 01:29 --- Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail||4.4.0 4.3.0 Known to work||3.3.3 Last reconfirmed|-00-00 00:00:00 |2008-12-27 01:29:47 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38638