From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1217 invoked by alias); 5 Feb 2003 16:46: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 1198 invoked by uid 71); 5 Feb 2003 16:46:01 -0000 Resent-Date: 5 Feb 2003 16:46:01 -0000 Resent-Message-ID: <20030205164601.1197.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 Resent-Reply-To: gcc-gnats@gcc.gnu.org, gmelquio@ens-lyon.fr Received: (qmail 26183 invoked by uid 48); 5 Feb 2003 16:40:02 -0000 Message-Id: <20030205164002.26182.qmail@sources.redhat.com> Date: Wed, 05 Feb 2003 16:46:00 -0000 From: gmelquio@ens-lyon.fr Reply-To: gmelquio@ens-lyon.fr To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9586: ICE with switch-case and non-POD objects X-SW-Source: 2003-02/txt/msg00263.txt.bz2 List-Id: >Number: 9586 >Category: c++ >Synopsis: ICE with switch-case and non-POD objects >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Wed Feb 05 16:46:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Guillaume Melquiond >Release: gcc version 3.2.2 20030131 (Debian prerelease) >Organization: >Environment: Linux 2.5.59 #5 Mon Jan 20 20:34:47 CET 2003 i686 GNU/Linux >Description: The bug was first encountered with std::string. But the testcase only needs a non-POD object in the bad scope of a case statement. $ LANG=C g++ -v bug.cc Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs 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 --disable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20030131 (Debian prerelease) /usr/lib/gcc-lib/i386-linux/3.2.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=2 -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__ bug.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase bug.cc -version -o /tmp/ccOvWC6r.s GNU CPP version 3.2.2 20030131 (Debian prerelease) (cpplib) (i386 Linux/ELF) GNU C++ version 3.2.2 20030131 (Debian prerelease) (i386-linux) compiled by GNU C version 3.2.2 20030131 (Debian prerelease). 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.2/include /usr/include End of search list. bug.cc: In function `int main(int)': bug.cc:7: jump to case label bug.cc:6: enters scope of non-POD `s b' Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See for instructions. >How-To-Repeat: Just compile this code snippet: int l; struct s { ~s() { l++; } }; int main(int a) { switch(a) { case 0: s b; case 1: s c = b; } return 0; } >Fix: Write legal code :-) >Release-Note: >Audit-Trail: >Unformatted: