public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18095] New: [4.0 regression] ICE in cp_lexer_consume_token on missing ";"
@ 2004-10-21  8:18 reichelt at gcc dot gnu dot org
  2004-10-21  9:05 ` [Bug c++/18095] " nathan 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-10-21  8:18 UTC (permalink / raw)
  To: gcc-bugs

The following testcases cause an ICE on mainline:

====================
struct A
====================

====================
struct A {}
====================

The error message is

nase.cc:1: internal compiler error: in cp_lexer_consume_token, at
cp/parser.c:547
Please submit a full bug report, [etc.]

The regression was introduced yesterday or today.
I strongly suspect Nathan's patch
http://gcc.gnu.org/ml/gcc-cvs/2004-10/msg01185.html

Nathan, could you please have a look?

-- 
           Summary: [4.0 regression] ICE in cp_lexer_consume_token on
                    missing ";"
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, 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,nathan at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18095


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/18095] [4.0 regression] ICE in cp_lexer_consume_token on missing ";"
  2004-10-21  8:18 [Bug c++/18095] New: [4.0 regression] ICE in cp_lexer_consume_token on missing ";" reichelt at gcc dot gnu dot org
@ 2004-10-21  9:05 ` nathan at gcc dot gnu dot org
  2004-10-21  9:21 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-10-21  9:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2004-10-21 09:05 -------
undoubtably from my patch

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18095


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/18095] [4.0 regression] ICE in cp_lexer_consume_token on missing ";"
  2004-10-21  8:18 [Bug c++/18095] New: [4.0 regression] ICE in cp_lexer_consume_token on missing ";" reichelt at gcc dot gnu dot org
  2004-10-21  9:05 ` [Bug c++/18095] " nathan at gcc dot gnu dot org
@ 2004-10-21  9:21 ` reichelt at gcc dot gnu dot org
  2004-10-22 11:42 ` cvs-commit at gcc dot gnu dot org
  2004-10-22 12:43 ` nathan at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-10-21  9:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18095


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/18095] [4.0 regression] ICE in cp_lexer_consume_token on missing ";"
  2004-10-21  8:18 [Bug c++/18095] New: [4.0 regression] ICE in cp_lexer_consume_token on missing ";" reichelt at gcc dot gnu dot org
  2004-10-21  9:05 ` [Bug c++/18095] " nathan at gcc dot gnu dot org
  2004-10-21  9:21 ` reichelt at gcc dot gnu dot org
@ 2004-10-22 11:42 ` cvs-commit at gcc dot gnu dot org
  2004-10-22 12:43 ` nathan at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-22 11:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-22 11:42 -------
Subject: Bug 18095

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2004-10-22 11:42:30

Modified files:
	gcc/cp         : ChangeLog parser.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: crash18.C crash19.C 

Log message:
	cp:
	PR c++/18095
	* parser.c (eof_token): Make const, correctly initialize rid and
	location fields.
	(struct cp_lexer): Replace buffer_end pointer with buffer_length
	count. Adjust.
	(cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
	zero it out.
	(cp_lexer_new_from_tokens): Adjust.
	(cp_lexer_grow_buffer): Remove.
	(cp_lexer_peek_nth_token, cp_lexer_consume_token,
	cp_lexer_purge_token): Add const casts.
	testsuite:
	PR c++/18095
	* g++.dg/parse/crash18.C: New.
	* g++.dg/parse/crash19.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4451&r2=1.4452
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.268&r2=1.269
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4485&r2=1.4486
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash18.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash19.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18095


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/18095] [4.0 regression] ICE in cp_lexer_consume_token on missing ";"
  2004-10-21  8:18 [Bug c++/18095] New: [4.0 regression] ICE in cp_lexer_consume_token on missing ";" reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-10-22 11:42 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-22 12:43 ` nathan at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-10-22 12:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2004-10-22 12:42 -------
2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/18095
	* parser.c (eof_token): Make const, correctly initialize rid and
	location fields.
	(struct cp_lexer): Replace buffer_end pointer with buffer_length
	count. Adjust.
	(cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
	zero it out.
	(cp_lexer_new_from_tokens): Adjust.
	(cp_lexer_grow_buffer): Remove.
	(cp_lexer_peek_nth_token, cp_lexer_consume_token,
	cp_lexer_purge_token): Add const casts.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18095


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-22 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-21  8:18 [Bug c++/18095] New: [4.0 regression] ICE in cp_lexer_consume_token on missing ";" reichelt at gcc dot gnu dot org
2004-10-21  9:05 ` [Bug c++/18095] " nathan at gcc dot gnu dot org
2004-10-21  9:21 ` reichelt at gcc dot gnu dot org
2004-10-22 11:42 ` cvs-commit at gcc dot gnu dot org
2004-10-22 12:43 ` nathan 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).