This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ICE in recent snapshots: Tree check: expected class 'd', have 'x' , (overload)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: ICE in recent snapshots: Tree check: expected class 'd', have 'x' , (overload)
- From: "Richard B. Kreckel" <kreckel at ginac dot de>
- Date: Mon, 6 Nov 2000 21:01:17 +0100 (CET)
- Reply-To: Richard dot Kreckel at Uni-Mainz dot DE
Hi,
I didn't get these about two or three months ago, but can't tell when
exactly they appeared. Here is a small program to reproduce the ICE (it
may be worth mentioning that it depends on the seemingly innocent dcl'n of
make_foo(int)):
struct foo {
private:
unsigned long length;
char data[1];
foo ();
public:
friend foo* make_foo (int);
friend foo* make_foo (const char *);
};
struct bar {
private:
foo * pointer;
public:
bar (const char * s);
};
inline bar::bar (const char * s)
{
extern foo* make_foo (const char *);
pointer = make_foo(s);
}
Here is what happens:
baryon:~/projects/gccbug$ /temp/bin/c++ -c bug17.cpp
optest5.cpp: In constructor `bar::bar(const char *)':
optest5.cpp:20: Tree check: expected class 'd', have 'x' (overload)
optest5.cpp:20: Internal compiler error in , at ../egcs-20001023/gcc/cp/decl.c:
3854
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Regards
-rbk.
--
Richard B. Kreckel
<kreckel@ginac.de>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>