Bug 7566 - g++ 3.3 ICE: Error reporting routines re-entered.
Summary: g++ 3.3 ICE: Error reporting routines re-entered.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Gabriel Dos Reis
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2002-08-10 10:16 UTC by snyder
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
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 snyder 2002-08-10 10:16:01 UTC
gcc crashes on the following (invalid) input:

$ g++ -c y.cc
y.cc: In function `void foo(int)':
y.cc:11: error: jump to case label
y.cc:8: error:   crosses initialization of `bar x'

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

Release:
3.3 20020808 (experimental)

Environment:
System: Linux karma 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown
Architecture: i686

	<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long : (reconfigured)  : (reconfigured)

How-To-Repeat:
---------------------------------------------------
struct bar { bar(); ~bar();};

void foo (int c)
{
  switch (c) {
  case 0:
  case 1:
    bar x;
    break;

  default:
    break;
  }
}
---------------------------------------------------

Unformatted:
 SEND-PR: Leave "Confidential" as "no"; all GCC PRs are public.
 SEND-PR: critical     GCC is completely not operational; no work-around known.
 SEND-PR: serious      GCC is not working properly; a work-around is possible.
 SEND-PR: non-critical Report indicates minor problem.
 SEND-PR: medium       The problem should be solved in the next release.
 SEND-PR: low          The problem should be solve in a future release.
 SEND-PR: doc-bug          The documentation is incorrect.
 SEND-PR: accepts-illegal  GCC fails to reject erroneous code.
 SEND-PR: rejects-legal    GCC gives an error message for correct code.
 SEND-PR: wrong-code       The machine code generated by gcc is incorrect.
 SEND-PR: ice-on-legal-code   GCC gives an Internal Compiler Error (ICE)
 SEND-PR:                     for correct code
 SEND-PR: ice-on-illegal-code GCC gives an ICE instead of reporting an error
 SEND-PR: pessimizes-code     GCC misses an important optimization opportunity
 SEND-PR: sw-bug              Software bug of some other class than above
 SEND-PR: change-request      A feature in GCC is missing.
 SEND-PR: support             I need help with gcc.
Comment 1 snyder 2002-08-10 10:16:01 UTC
Fix:
	<how to correct or work around the problem, if known (multiple lines)>
Comment 2 Gabriel Dos Reis 2002-08-14 10:52:00 UTC
Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-Why: Analyzed.
Comment 3 Gabriel Dos Reis 2002-08-14 10:52:00 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Fixed with.
    
    2002-08-14  Gabriel Dos Reis  <gdr@nerim.net>
    
            Fix PR/7566
            * c-semantics.c (genrtl_case_label): Don't (mis)use
            warning_with_decl.