public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9586: ICE with switch-case and non-POD objects
@ 2003-02-05 16:46 gmelquio
  0 siblings, 0 replies; only message in thread
From: gmelquio @ 2003-02-05 16:46 UTC (permalink / raw)
  To: gcc-gnats


>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 <URL:http://www.gnu.org/software/gcc/bugs.html> 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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-05 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-05 16:46 c++/9586: ICE with switch-case and non-POD objects gmelquio

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).