This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12832] New: [3.4 regression] ICE: tree check: expected class 'd', have 'x' (error_mark) in location_of, at cp/error.c:1962
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Oct 2003 20:52:17 -0000
- Subject: [Bug c++/12832] New: [3.4 regression] ICE: tree check: expected class 'd', have 'x' (error_mark) in location_of, at cp/error.c:1962
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12832
Summary: [3.4 regression] ICE: tree check: expected class 'd',
have 'x' (error_mark) in location_of, at cp/error.c:1962
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: redi at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
The following code produces an ICE with g++ 3.4 but exited gracefully with
previous versions:
void f() { g(); }
void g() { }
Mainline 3.4 produces the following ICE on all builds I had available from the
last 3 months:
ice-undecl.cc: In function `void f()':
ice-undecl.cc:1: error: `g' undeclared (first use this function)
ice-undecl.cc:1: error: (Each undeclared identifier is reported only once for
each function it appears in.)
ice-undecl.cc: In function `void g()':
ice-undecl.cc:2: error: `void g()' used prior to declaration
ice-undecl.cc:2: error: declaration of `void g()'
ice-undecl.cc:2: internal compiler error: tree check: expected class 'd', have
'x' (error_mark) in location_of, at cp/error.c:1962
Reproducible on Linux and FreeBSD 4.8.
gcc -v gives:
Reading specs from /home/redi/gcc/3.x/lib/gcc/i586-pc-linux-gnu/3.4/specs
Configured with: ../gcc-3.x/configure --prefix=/home/redi/gcc/3.x
--enable-languages=c,c++ --disable-nls --enable-threads=posix
--enable-concept-checks
Thread model: posix
gcc version 3.4 20031027 (experimental)
and
Reading specs from
/data/development/jw/gcc3/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/specs
Configured with: /home/jw/src/cvs/ext/gcc/configure --prefix=/home/jw/gcc3/
--enable-languages=c,c++ --enable-concept-checks --enable-libstdcxx-pch
Thread model: posix
gcc version 3.4 20031010 (experimental)