This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

1.0.3b bug report


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]