This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error with pointers to members.
- To: bug-gcc at gnu dot org, gcc-bugs at gcc dot gnu dot org
- Subject: Internal compiler error with pointers to members.
- From: Dirk Zoller <duz at rtsffm dot com>
- Date: Mon, 30 Aug 1999 16:50:11 +0200 (MET DST)
- Reply-to: duz at rtsffm dot com
duz@srvlinux1:~$ gcc --version
2.95.1
duz@srvlinux1:~$ uname -a
Linux srvlinux1 2.2.5 #5 SMP Tue Jun 22 11:46:34 MEST 1999 i686 unknown
duz@srvlinux1:~$
duz@srvlinux1:~$ gcc -v --save-temps -c test.cc
Reading specs from /opt/gnu/gcc-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/specs
gcc version 2.95.1 19990816 (release)
/opt/gnu/gcc-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ test.cc test.ii
GNU CPP version 2.95.1 19990816 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/opt/gnu/gcc-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/../../../../include/g++-3
/usr/local/include
/opt/gnu/gcc-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/../../../../i686-pc-linux-gnu/include
/opt/gnu/gcc-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/opt/gnu/gcc-2.95.1/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/cc1plus test.ii -quiet -dumpbase test.cc -version -o test.s
GNU C++ version 2.95.1 19990816 (release) (i686-pc-linux-gnu) compiled by GNU C version 2.95.1 19990816 (release).
test.cc: In function `void blabla()':
test.cc:17: Internal compiler error in `const_hash', at varasm.c:2372
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
duz@srvlinux1:~$
This is the offending program, preprocessed:
# 1 "test.cc"
extern "C" char *puts (char const *);
class A
{
public:
void eins ();
void zwei ();
void drei ();
};
void A::eins () { puts ("1"); }
void A::zwei () { puts ("2"); }
void A::drei () { puts ("3"); }
void blabla()
{
void (A::*zahl[]) () = { &A::eins, &A::zwei, &A::drei };
}
The system type doesn't matter.
When the vector zahl[] is declared static then no internal error.