Bug: Internal compiler error (with member pointer).

Sergei Organov osv@javad.ru
Wed Apr 15 01:09:00 GMT 1998


Compiling the following code:

$ cat mptr.cc
class A {
public:
  typedef void (A::*Func)();
  Func funcPtr;
  A(): funcPtr(&func) {}
  void func();
  void foo() {
    this->funcPtr(); // Internal compiler error
  }
};

$ ~/local/bin/g++ -v -c mptr.cc
Reading specs from
/home/osv/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
 /home/osv/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=90 -Di386 -D__ELF__ -Dunix -Dlinux -D__i386__ -D__ELF__
-D__unix__ -D__linux__ -D__i386 -D__unix -D__linux -Asystem(posix)
-D__EXCEPTIONS -Di386 -Di586 -Asystem(unix) -Acpu(i386) -Amachine(i386)
-D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) mptr.cc
/tmp/cca18680.ii
GNU CPP version egcs-2.90.27 980315 (egcs-1.0.2 release) (i386
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /home/osv/local/include/g++
 /usr/local/include
 /home/osv/local/i586-pc-linux-gnulibc1/include
 /home/osv/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/include
 /usr/include
End of search list.
 /home/osv/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/cc1plus
/tmp/cca18680.ii -quiet -dumpbase mptr.cc -version -o /tmp/cca18680.s
GNU C++ version egcs-2.90.27 980315 (egcs-1.0.2 release)
(i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.90.27 980315
(egcs-1.0.2 release).
mptr.cc: In method `void A::foo()':
mptr.cc:8: Internal compiler error.
mptr.cc:8: Please submit a full bug report to `egcs-bugs@cygnus.com'.



More information about the Gcc-bugs mailing list