GCC:Internal compiler error on member template usage.

Rolf Barwick Rolf.Barwick@aculab.com
Tue Sep 21 05:11:00 GMT 1999


Internal compiler error when compiled with gcc (and g++) with no options
(and -v --save-temps).
Report sent as requested by error message, despite concerns over sanity of
usage of member templates.
GCC version:GNU CPP version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
(i386 Linux/ELF)
System:Red Hat Linux release 6.0 (Hedwig) Kernel 2.2.5-15 on an i586.
Source as follows:
================
#include <map>

int main(void)
{
	map <int, int> m;

	map<m.key_type, int>::iterator j;
	
	//m.key_type k;
}
=================
Generated stderr output follows:
=================
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cpp -lang-c++ -v -undef
-D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix
-Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__
-D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS
-Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
bug_iterate.C bug_iterate.ii
GNU CPP version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++-2
 /usr/i386-redhat-linux/include
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cc1plus bug_iterate.ii
-quiet -dumpbase bug_iterate.cc -version -o bug_iterate.s
GNU C++ version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
(i386-redhat-linux) compiled by GNU C version egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release).
bug_iterate.C: In function `int main()':
bug_iterate.C:7: warning: invalid use of type decl `typedef int
map<int,int,less<int>,__default_alloc_template<true,0> >::key_type' as
expression
bug_iterate.C:7: Internal compiler error.
bug_iterate.C:7: Please submit a full bug report to
`egcs-bugs@egcs.cygnus.com'.
bug_iterate.C:7: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for
details.
=================
and bzip2 of the.ii file is attached.
 <<bug_iterate.ii.bz2>> 



More information about the Gcc-bugs mailing list