Compile the attached file with gcc 3.2.2 (no arguments) ConfigurationInputs.cpp: In member function `void ConfigurationInputs::removeInput(Basic::InputConfigStruct*)': ConfigurationInputs.cpp:138: Internal compiler error in grokdeclarator, at cp/decl.c:11921 The error occurs at the 'mutable' definition. Release: 3.2.2 Thread model: posix Environment: uname -a: SunOS roscoe 5.8 Generic_108528-15 sun4u sparc SUNW,Sun-Blade-1000
Fix: http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01779.html
From: "Giovanni Bajo" <giovannibajo@libero.it> To: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <mark.merriman@dc.alphatech.com>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org> Cc: "Wolfgang Bangerth" <bangerth@ices.utexas.edu> Subject: Re: middle-end/10451: (3.2.2) ICE on mutable definitions of iterators Date: Tue, 22 Apr 2003 16:34:53 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=10451 Reduced snippet is: ----------------------------------------- struct Bar { typedef int type; }; struct Foo { void func(void) { mutable Bar::type x; } }; ----------------------------------------- pr10451.cpp: In member function `void Foo::func()': pr10451.cpp:10: Internal compiler error in grokdeclarator, at cp/decl.c:11906 Please submit a full bug report, The code is illegal, but we should not ICE anyway. This is a 3.2/3.3/3.4 regression wrt to 2.95 which was giving a normal error message. For the original poster: your code is illegal because mutable may not be used to define local variables. Giovanni Bajo
State-Changed-From-To: open->analyzed State-Changed-Why: Just as Giovanni said
Responsible-Changed-From-To: unassigned->mmitchel Responsible-Changed-Why: Working on a fix.
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/10451 Date: 23 Apr 2003 16:27:27 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2003-04-23 16:27:27 Modified files: gcc/cp : ChangeLog class.c cp-tree.h decl.c semantics.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/parse: crash4.C crash5.C Log message: PR c++/9847 * cp-tree.h (duplicate_tag_error): Remove. * class.c (duplicate_tag_error): Remove. * semantics.c (begin_class_definition): Return immediately for a duplicate class definition. PR c++/10451 * decl.c (grokdeclarator): Correct logic for "mutable" errors. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3336&r2=1.3337 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.532&r2=1.533 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.838&r2=1.839 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1039&r2=1.1040 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.300&r2=1.301 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2615&r2=1.2616 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/10451 Date: 23 Apr 2003 17:33:02 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: mmitchel@gcc.gnu.org 2003-04-23 17:33:02 Modified files: gcc/cp : ChangeLog decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/parse: crash4.C Log message: PR c++/10451 * decl.c (grokdeclarator): Correct logic for "mutable" errors. PR c++/10451 * g++.dg/parse/crash4.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.113&r2=1.3076.2.114 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.965.2.37&r2=1.965.2.38 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.150&r2=1.2261.2.151 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed in GCC 3.3, GCC 3.4.