This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Internal Compiler Error egcs-1.0.1


This admittedly bizarre code causes a sigsegv.  Guess who was playing
around with nested template members?

As an aside, the standard (& comp.std.c++ newsgroup) assert
the following is legal, egcs disagrees:
	class foo {
	  template <typename T> class member_template;
	};
	template <typename T> class A::member_template {};
---------------------
The file tt2.C:
---------------------
class A
{
      class A_impl;
   public: 
      A(){}
};


template <class j> class A::A_impl
{
};
---------------------
The compilation
---------------------
g++  -Wall  -g -v  -c tt2.C -o tt2.o
Reading specs from /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.23/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -g -Wall -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) tt2.C /var/tmp/cc0veZhf.ii
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/egcs/include/g++
 /usr/local/include
 /usr/local/egcs/sparc-sun-solaris2.6/include
 /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.23/include
 /usr/include
End of search list.
 /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.23/cc1plus /var/tmp/cc0veZhf.ii -quiet -dumpbase tt2.cc -g -Wall -version -o /var/tmp/cc0veZhf.s
GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (sparc-sun-solaris2.6) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
tt2.C:10: Internal compiler error.
tt2.C:10: Please submit a full bug report to `egcs-bugs@cygnus.com'.
gmake: *** [tt2.o] Error 1

Compilation exited abnormally with code 2 at Mon Jun 29 13:19:51


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]