egcs-1.0.3a: C++ `realloc()' member function causes internal compilererror
Matthew D. Langston
langston@SLAC.Stanford.EDU
Mon Jul 20 12:03:00 GMT 1998
Hello all,
I received an egcs C++ internal compiler error this morning while
compiling a third party C++ class library. I was able to create a tiny
little 12 line test class which reproduces this error, which I've
included below. The problem only occurs when I compile with
optimization *and* when I have a member function named `realloc()' (but
see below for all of the details).
The version of the egcs C++ compiler I am using is:
$ g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
The computer on which I originally compiled and installed egcs, and
which I received the `internal compiler error' for my test class, is a
Pentium II (Dell XPS H266) running RedHat Linux 5.1 (e.g. glibc2) with
all RedHat RPM updates installed at the time I wrote this bug report.
The following C++ class named `BugClass' compiled with optimization
generates an `Internal compiler error'.
class BugClass
{
public:
void foo()
{
realloc();
}
void realloc()
{}
};
The exact command I used to reproduce this bug is the following:
$ g++ -O -c BugClass.cxx -o BugClass.o
The output I received from the C++ compiler is:
BugClass.cxx: In method `void BugClass::foo()':
BugClass.cxx:7: Internal compiler error.
BugClass.cxx:7: Please submit a full bug report to `egcs-bugs@cygnus.com'.
--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU
(650) 926-3279
More information about the Gcc-bugs
mailing list