Bug report

Morten Nicolaj Pedersen forge@diku.dk
Wed Mar 31 23:54:00 GMT 1999


Att. developers/maintainers

I am using egcs version 1.1.1 which I have built myself on my Pentium
desktop PC / Redhat Linux 5.2 system (I gave no options to 'configure').
When trying to compile 'Sparse_table.cpp' with options '-c -g -O' (or with
no options at all) I get the following:

************************************************************************

cd ~/documents/speciale/src/alpha/
make Sparse_table.o
g++ -c  -g -O -I/home/mortennp/documents/speciale/src/download/randgen -I/home/mortennp/documents/speciale/src/download/newran02 Sparse_table.cpp -o Sparse_table.o
Sparse_table.h: In method `::Sparse_table::::Sparse_table::Hash_func<long long unsigned int,short unsigned int>::Hash_func<word, short unsigned int>(short unsigned int = (8 * sizeof (Key)), unsigned char = 16)':
Sparse_table.cpp:102:   instantiated from here
Sparse_table.h:86: Internal compiler error 980519.
Sparse_table.h:86: Please submit a full bug report to `egcs-bugs@cygnus.com'.
Sparse_table.h:86: See <URL: http://egcs..cygnus.com/faq.html#bugreport > for details.
make: *** [Sparse_table.o] Error 1

Compilation exited abnormally with code 2 at Tue Mar  9 12:10:33

************************************************************************

It is my instantiation of (for instance) 'Hash_func' which causes
problems. If I remove all the explicit instantiations, the code compiles
with no errors. I get the same kind of error, if I try to use/implicitly
instantiate (for instance) 'Hash_func' from a file, which '#include's
'Sparse_table.h'.

What gives? Am I missing something? I have read the .info-file on
gcc/g++/egcs rather thoroughly, giving special attention to the section on
template instantiation. Apologies in advance, if I am simply bothering you
due to lack of understanding.

I have placed a copy of 'Sparse_table.ii', which results from compiling
with '-E -C' on my homepage. The URL is:

	http://www.diku.dk/students/forge/Sparse_table.tar.gz

I think I have obeyed the bug reporting instructions. Let me know if I
forgot to detail anything important.

Regards

          Morten Nicolaj Pedersen   E-address: forge@diku.dk
       Department of Computer Science, University of Copenhagen


More information about the Gcc-bugs mailing list