C++ - Internal compiler error - 2.95.1 - invalid code using templates

Patrick Smith patsmith@pobox.com
Wed Sep 22 22:11:00 GMT 1999


gcc 2.95.1 reported an internal compiler error, so I'm
reporting to to you.

Note that the code it was trying to compile has an error;
on the line it complains about, List::operator= should be
List<char>::operator=.  With this correction applied, the
code compiles.

I am using Red Hat Linux 6.0.

A compressed file xx.ii.bz2 is included as an attachment
to this message.

Here is the output of 'gcc -v --save-temps xx.cc':


Reading specs from
/pkg/installed/gcc/2.95.1@1/lib/gcc-lib/i586-pc-linux-gnu/2.95.1/specs
gcc version 2.95.1 19990816 (release)
 /pkg/installed/gcc/2.95.1@1/lib/gcc-lib/i586-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__ -Di586 -Dpentium
-D__i586 -D__i586__ -D__pentium -D__pentium__ xx.cc xx.ii
GNU CPP version 2.95.1 19990816 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:

/pkg/installed/gcc/2.95.1@1/lib/gcc-lib/i586-pc-linux-gnu/2.95.1/../../../../include/g++-3

/pkg/installed/gcc/2.95.1@1/lib/gcc-lib/i586-pc-linux-gnu/2.95.1/../../../../i586-pc-linux-gnu/include

/pkg/installed/gcc/2.95.1@1/lib/gcc-lib/i586-pc-linux-gnu/2.95.1/include
 /usr/include
End of search list.
The following default directories have been omitted from the search
path:
 /usr/local/include
End of omitted list.

/pkg/installed/gcc/2.95.1@1/lib/gcc-lib/i586-pc-linux-gnu/2.95.1/cc1plus
xx.ii -quiet -dumpbase xx.cc -version -o xx.s
GNU C++ version 2.95.1 19990816 (release) (i586-pc-linux-gnu) compiled
by GNU C version 2.95.1 19990816 (release).
In file included from xx.cc:1:
Slug.h: In method `class Slug & Slug::operator =(const Slug &)':
Slug.h:27: Internal compiler error.
Slug.h:27: Please submit a full bug report.
Slug.h:27: See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport >
for instructions.
-- 
patsmith@pobox.com
xx.ii.bz2



More information about the Gcc-bugs mailing list