This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
1.0.3b bug report
- To: egcs-bugs at cygnus dot com
- Subject: 1.0.3b bug report
- From: Pawel Salek <pawsa at ifm dot liu dot se>
- Date: Tue, 23 Mar 1999 23:54:26 +0100 (MET)
Hi,
I use
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
The following program (the command line: g++ buggy.cc):
class X {
public:
int f(void);
void b();
};
typedef struct {
int (X::*cmdH)(void);
} CmdDesc;
int X::f()
{ return 0; }
void X::b() {
CmdDesc a = {&f};
a.cmdH();
}
causes a "controled" crash of the g++ compiler:
buggy.cc: In method `void X::b()':
buggy.cc:15: Internal compiler error.
buggy.cc:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.
When X::b() is replaced by the correct construction:
void X::b() {
CmdDesc a = {&f};
(this->*a.cmdH)();
}
the compilation doesn't crash.
Pawel
-----
Pawel Salek (pawsa@ifm.liu.se) WWW: http://www.ifm.liu.se/~pawsa/
Computational Physics Div., Linkoping, Sweden phone +46 13 281268