Internal compiler error with egcs

Graham Gilmore grahamg@cst.ca
Wed May 5 14:36:00 GMT 1999


	Hello; I'm using egcs 1.1.2 on sparc-sun-solaris2.5.1 .
	While compiling some source code the compiler reported an internal
compiler error.  I saw that the code in question had an obvious syntax
error, so I managed to isolate the offending code & create a sample that
generates the error.  Following is the preprocessed output of the example,
and the output of gcc -v --save-temps -o error.out error.cpp
	Notice that the declaration of struct Bozo is missing a terminating
semi-colon.  Placing the semi-colon where it belongs eliminates the
internal compiler error.

------------------------------
# 1 "error.cpp"
namespace baz
{
template <class FOO> class Bar
{
public:
    Bar() {};
    ~Bar() {};
};
};

struct Bozo
{
    int operator () (int in_Int1, int in_Int2) const;
}






typedef baz::Bar<long> LongBar;

int main(void)
{
    LongBar theLongBar;
    int i = 2;
    int l = 4 + i;

    return(l-6);
};

-------------------------------

Reading specs from
/usr/local/pkgs/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/local/pkgs/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.66/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=91 -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 -D__GCC_NEW_VARARGS__
-Acpu(sparc) -Amachine(sparc) error.cpp error.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/pkgs/egcs-1.1.2/include/g++
 /usr/local/include
 /usr/local/pkgs/egcs-1.1.2/sparc-sun-solaris2.5.1/include
 /usr/local/pkgs/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.66/incl
ude
 /usr/include
End of search list.
 /usr/local/pkgs/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.66/cc1p
lus error.ii -quiet -dumpbase error.cc -version -o error.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release)
(sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.91.66 19990314
(egcs-1.1.2 release).
error.cpp:21: Internal compiler error 980711.
error.cpp:21: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
error.cpp:21: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.





More information about the Gcc-bugs mailing list