User account creation filtered due to spam.

Bug 8615 - [3.2/3.3 regression] ICE in tree_low_cst, at tree.c:3484
Summary: [3.2/3.3 regression] ICE in tree_low_cst, at tree.c:3484
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2.1
: P1 critical
Target Milestone: ---
Assignee: Mark Mitchell
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-11-17 12:36 UTC by scamel
Modified: 2003-07-25 17:33 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description scamel 2002-11-17 12:36:02 UTC
Compiler crashes when compiling a simple source. It's not perfectly legal code, but I think it should compile. The command line and compiler output is:


~/work/cpp$ g++-3.2 -v proba.cc -save-temps
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.1/specs
Configured with: /home/packages/gcc/3.2/gcc-3.2-3.2.1ds5/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.1 20021111 (Debian prerelease)
 /usr/lib/gcc-lib/i386-linux/3.2.1/cpp0 -lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ proba.cc proba.ii
GNU CPP version 3.2.1 20021111 (Debian prerelease) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.2
 /usr/include/c++/3.2/i386-linux
 /usr/include/c++/3.2/backward
 /usr/local/include
 /usr/lib/gcc-lib/i386-linux/3.2.1/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-linux/3.2.1/cc1plus -fpreprocessed proba.ii -quiet -dumpbase proba.cc -version -o proba.s
GNU CPP version 3.2.1 20021111 (Debian prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.1 20021111 (Debian prerelease) (i386-linux)
        compiled by GNU C version 3.2.1 20021111 (Debian prerelease).
proba.cc:4: Internal compiler error in tree_low_cst, at tree.c:3484
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
3.2.1-pre6 20021111 Debian-prerelease

Environment:
Celeron 366 with Asus P2B-F motherboard, Debian sid

How-To-Repeat:
template <class CharType, CharType line_terminator = 0>
class String {};

String<char, 255> s;
Comment 2 Volker Reichelt 2002-11-18 05:54:16 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.
    
    gcc 3.0.x, the 3.2-branch, and mainline are affected.
    However, the code compiles fine under gcc 2.95.3.
Comment 3 Mark Mitchell 2002-12-02 12:39:38 UTC
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.
Comment 4 Mark Mitchell 2002-12-02 22:56:59 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.2.2 and GCC 3.3.
Comment 5 Mark Mitchell 2002-12-03 06:52:26 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/8615
Date: 3 Dec 2002 06:52:26 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2002-12-02 22:52:25
 
 Modified files:
 	gcc/cp         : ChangeLog error.c spew.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/parse: defarg1.C 
 	gcc/testsuite/g++.dg/template: char1.C 
 
 Log message:
 	PR c++/8720
 	* spew.c (remove_last_token): Make sure that last_chunk is set
 	correctly.
 	
 	PR c++/8615
 	* error.c (dump_expr): Handle character constants with
 	TREE_OVERFLOW set.
 	
 	PR c++/8720
 	* g++.dg/parse/defarg1.C: New test.
 	
 	PR c++/8615
 	* g++.dg/template/char1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3064&r2=1.3065
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.189&r2=1.190
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/spew.c.diff?cvsroot=gcc&r1=1.75&r2=1.76
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2248&r2=1.2249
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/defarg1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/char1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 6 Mark Mitchell 2002-12-03 06:52:26 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/8615
Date: 3 Dec 2002 06:52:26 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2002-12-02 22:52:25
 
 Modified files:
 	gcc/cp         : ChangeLog error.c spew.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/parse: defarg1.C 
 	gcc/testsuite/g++.dg/template: char1.C 
 
 Log message:
 	PR c++/8720
 	* spew.c (remove_last_token): Make sure that last_chunk is set
 	correctly.
 	
 	PR c++/8615
 	* error.c (dump_expr): Handle character constants with
 	TREE_OVERFLOW set.
 	
 	PR c++/8720
 	* g++.dg/parse/defarg1.C: New test.
 	
 	PR c++/8615
 	* g++.dg/template/char1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3064&r2=1.3065
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.189&r2=1.190
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/spew.c.diff?cvsroot=gcc&r1=1.75&r2=1.76
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2248&r2=1.2249
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/defarg1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/char1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 7 Mark Mitchell 2002-12-03 06:53:12 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/8615
Date: 3 Dec 2002 06:53:12 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2002-12-02 22:53:12
 
 Modified files:
 	gcc/cp         : ChangeLog error.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: char1.C 
 
 Log message:
 	PR c++/8615
 	* error.c (dump_expr): Handle character constants with
 	TREE_OVERFLOW set.
 	
 	PR c++/8615
 	* g++.dg/template/char1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.48&r2=1.2685.2.114.2.49
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.170.2.3&r2=1.170.2.3.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.63&r2=1.1672.2.166.2.64
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/char1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
 

Comment 8 Mark Mitchell 2002-12-03 06:53:12 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/8615
Date: 3 Dec 2002 06:53:12 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2002-12-02 22:53:12
 
 Modified files:
 	gcc/cp         : ChangeLog error.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: char1.C 
 
 Log message:
 	PR c++/8615
 	* error.c (dump_expr): Handle character constants with
 	TREE_OVERFLOW set.
 	
 	PR c++/8615
 	* g++.dg/template/char1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.48&r2=1.2685.2.114.2.49
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.170.2.3&r2=1.170.2.3.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.63&r2=1.1672.2.166.2.64
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/char1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1