From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7676 invoked by alias); 21 Feb 2003 17:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7630 invoked by uid 71); 21 Feb 2003 17:16:00 -0000 Resent-Date: 21 Feb 2003 17:16:00 -0000 Resent-Message-ID: <20030221171600.7629.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, "H. S. Teoh" Resent-Reply-To: gcc-gnats@gcc.gnu.org, 180937@bugs.debian.org Received: (qmail 31301 invoked from network); 21 Feb 2003 17:07:21 -0000 Received: from unknown (HELO hirsch.in-berlin.de) (192.109.42.6) by 172.16.49.205 with SMTP; 21 Feb 2003 17:07:21 -0000 Received: from tango.net.local (mail@dsl-213-023-043-197.arcor-ip.net [213.23.43.197]) (authenticated bits=0) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id h1LH7J09018617 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT); Fri, 21 Feb 2003 18:07:20 +0100 Received: from doko by tango.net.local with local (Exim 4.12 #1 (Debian) [+araqnid]) id 18mGdm-0001ZG-00; Fri, 21 Feb 2003 18:07:14 +0100 Message-Id: Date: Fri, 21 Feb 2003 17:16:00 -0000 From: Matthias Klose Reply-To: 180937@bugs.debian.org To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: "H. S. Teoh" Subject: c++/9789: [3.2 ICE regression, fixed in 3.3] Error reporting routines re-entered X-SW-Source: 2003-02/txt/msg01072.txt.bz2 List-Id: >Number: 9789 >Category: c++ >Synopsis: [3.2 ICE regression, fixed in 3.3] Error reporting routines re-entered >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Fri Feb 21 17:16:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: "H. S. Teoh" >Release: 3.2.2 (Debian) (Debian unstable) >Organization: The Debian Project >Environment: System: Debian GNU/Linux (unstable) Architecture: i686 host: i386-linux Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,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.2 20021212 (Debian prerelease) >Description: [ Reported to the Debian BTS as report #180937. Please CC 180937@bugs.debian.org on replies. Log of report can be found at http://bugs.debian.org/180937 ] A regression from 2.95, fixed in 3.3: /* * g++ 3.2 bug in handling switch statements that contain object declarations * constructed using objects declared outside the switch. */ class common { }; class someclass { public: someclass(common *c) { } ~someclass() { } }; class someotherclass { public: someotherclass(common *c) { } ~someotherclass() { } }; int main(int argc, char *argv[]) { enum { CHOICE_A, CHOICE_B } choice = CHOICE_A; common commonobj; switch (choice) { case CHOICE_A: someclass obj1(&commonobj); // do something break; case CHOICE_B: someotherclass obj2(&commonobj); // do something break; default: break; } } class common { }; class someclass { public: someclass(common *c) { } ~someclass() { } }; class someotherclass { public: someotherclass(common *c) { } ~someotherclass() { } }; int main(int argc, char *argv[]) { enum { CHOICE_A, CHOICE_B } choice = CHOICE_A; common commonobj; switch (choice) { case CHOICE_A: someclass obj1(&commonobj); break; case CHOICE_B: someotherclass obj2(&commonobj); break; default: break; } } $ g++-3.2 bug-180937.cc bug-180937.cc: In function `int main(int, char**)': bug-180937.cc:29: jump to case label bug-180937.cc:26: crosses initialization of `someclass obj1' bug-180937.cc:33: jump to case label bug-180937.cc:30: crosses initialization of `someotherclass obj2' bug-180937.cc:26: crosses initialization of `someclass obj1' Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See for instructions. both g++-2.95.3 and current 3.3 don't ICE. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: