public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18758] New: [4.0 regression] ICE redeclaring struct as template
@ 2004-12-01 15:46 reichelt at gcc dot gnu dot org
2004-12-01 15:50 ` [Bug c++/18758] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-12-01 15:46 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet causes an ICE on mainline:
===============================
namespace N
{
struct A;
}
template<int> struct N::A {};
===============================
bug.cc:6: error: 'template<int <anonymous> > struct N::A' redeclared as
different kind of symbol
bug.cc:3: error: previous declaration of 'struct N::A'
bug.cc:6: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in cp_parser_class_specifier, at cp/parser.c:12298
Please submit a full bug report, [etc.]
The regression was introduced here:
: Search converges between 2004-02-01-trunk (#445) and 2004-03-01-trunk (#446).
Looks like we don't handle cp_parser_class_head returning error_mark_node
in cp_parser_class_specifier.
Should we always return NULL_TREE if cp_parser_class_head fails?
Or should we check for error_mark_node in cp_parser_class_specifier
as well? (Since both cases will probably handled in the same code path,
the former makes more sense to me.)
--
Summary: [4.0 regression] ICE redeclaring struct as template
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18758
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18758] [4.0 regression] ICE redeclaring struct as template
2004-12-01 15:46 [Bug c++/18758] New: [4.0 regression] ICE redeclaring struct as template reichelt at gcc dot gnu dot org
@ 2004-12-01 15:50 ` pinskia at gcc dot gnu dot org
2004-12-02 10:57 ` nathan at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-01 15:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-01 15:49 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-12-01 15:49:51
date| |
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18758
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18758] [4.0 regression] ICE redeclaring struct as template
2004-12-01 15:46 [Bug c++/18758] New: [4.0 regression] ICE redeclaring struct as template reichelt at gcc dot gnu dot org
2004-12-01 15:50 ` [Bug c++/18758] " pinskia at gcc dot gnu dot org
@ 2004-12-02 10:57 ` nathan at gcc dot gnu dot org
2004-12-02 13:29 ` nathan at gcc dot gnu dot org
2004-12-02 13:35 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-12-02 10:57 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18758
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18758] [4.0 regression] ICE redeclaring struct as template
2004-12-01 15:46 [Bug c++/18758] New: [4.0 regression] ICE redeclaring struct as template reichelt at gcc dot gnu dot org
2004-12-01 15:50 ` [Bug c++/18758] " pinskia at gcc dot gnu dot org
2004-12-02 10:57 ` nathan at gcc dot gnu dot org
@ 2004-12-02 13:29 ` nathan at gcc dot gnu dot org
2004-12-02 13:35 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-12-02 13:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nathan at gcc dot gnu dot org 2004-12-02 13:29 -------
2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18758
* parser.c (cp_parser_class_head): Return NULL_TREE when
push_template_decl fails. Update comment.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18758
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18758] [4.0 regression] ICE redeclaring struct as template
2004-12-01 15:46 [Bug c++/18758] New: [4.0 regression] ICE redeclaring struct as template reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-12-02 13:29 ` nathan at gcc dot gnu dot org
@ 2004-12-02 13:35 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-02 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-02 13:35 -------
Subject: Bug 18758
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: nathan@gcc.gnu.org 2004-12-02 13:35:16
Modified files:
gcc/cp : ChangeLog parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/parse: crash21.C
Log message:
cp:
PR c++/18758
* parser.c (cp_parser_class_head): Return NULL_TREE when
push_template_decl fails. Update comment.
testsuite:
PR 18758
* g++.dg/parse/crash21.C: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4511&r2=1.4512
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.287&r2=1.288
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4707&r2=1.4708
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash21.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18758
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-12-02 13:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 15:46 [Bug c++/18758] New: [4.0 regression] ICE redeclaring struct as template reichelt at gcc dot gnu dot org
2004-12-01 15:50 ` [Bug c++/18758] " pinskia at gcc dot gnu dot org
2004-12-02 10:57 ` nathan at gcc dot gnu dot org
2004-12-02 13:29 ` nathan at gcc dot gnu dot org
2004-12-02 13:35 ` cvs-commit at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).