Internal compiler error using 970917 (EH?)
Tobias Ringstrom
tobias@it.chalmers.se
Fri Sep 19 03:21:00 GMT 1997
The following code gives an internal compiler error:
--------------------
#include <fstream.h>
class bifstream : public ifstream {
public:
bifstream();
// ~bifstream();
};
void load_bin()
{
bifstream InFile;
if (!InFile)
return;
}
---------------------
when compiled using "g++ -O -c egcs-bug.cc". The error disappears if
* I uncomment the destructor, or
* if I compile without the '-O' switch, or
* if I add the '-fsjlj-exceptions'.
The -fno-exceptions does not remove the error.
~/Prog/it++/src> g++ -v -O -c egcs-bug.cc
Reading specs from
/optfree/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.08/specs
gcc version egcs-2.90.08 970917 (gcc2-970802 experimental)
/optfree/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.08/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=90 -Dsun -Dsparc -Dunix -D__svr4__ -D__SVR4
-D__GCC_NEW_VARARGS__ -D__sun__ -D__sparc__ -D__unix__ -D__svr4__ -D__SVR4
-D__GCC_NEW_VARARGS__ -D__sun -D__sparc -D__unix -Asystem(unix)
-Asystem(svr4) -Acpu(sparc) -Amachine(sparc) -D__EXCEPTIONS -D__OPTIMIZE__
egcs-bug.cc /var/tmp/cca000hm.ii
GNU CPP version egcs-2.90.08 970917 (gcc2-970802 experimental) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/optfree/qt/include
/optfree/it++/include
/optfree/egcs/include/g++
/optfree/egcs/sparc-sun-solaris2.5.1/include
/optfree/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.08/include
/usr/include
End of search list.
/optfree/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.08/cc1plus
/var/tmp/cca000hm.ii -quiet -dumpbase egcs-bug.cc -O -version -o
/var/tmp/cca000hm.s
GNU C++ version egcs-2.90.08 970917 (gcc2-970802 experimental)
(sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.90.06 970907
(gcc2-970802 experimental).
egcs-bug.cc: In function `void load_bin()':
egcs-bug.cc:15: Internal compiler error.
egcs-bug.cc:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.
/ Tobias
More information about the Gcc-bugs
mailing list