g++: internal compiler error 109 exceptions bad_alloc
Peter Schmid
schmid@ltoi.iap.physik.tu-darmstadt.de
Thu Apr 23 04:47:00 GMT 1998
The following file generates an iternal compiler error with
egcs-2.91.24 on i586-pc-linux-gnulibc1. The file is taken from
<www.cygnus.com/ml/egcs/1998-Apr/0895.html>, though slightly modified.
Peter Schmid
cat badalloc.C
#include<iostream>
#include<iomanip>
#include<exception>
using namespace std;
int main()
{
try{
char *s = new char[1<<28];
}catch(bad_alloc)
{
cerr<<"Caught oom"<< endl;
}
}
cd ~/ftp/
g++ -v -o badalloc badalloc.C
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.24
/specs
gcc version egcs-2.91.24 19980418 (gcc2 ss-980401 experimental)
/usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.24/cpp -lang-c++ -v
-undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__
-Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux
-Asystem(posix) -D__EXCEPTIONS -Di386 -Asystem(unix) -Acpu(i386)
-Amachine(i386) -D__pentium__ -D__i586__ -D__i386__ -Asystem(unix) -Acpu(i386)
-Amachine(i386) -D__pentium__ -D__i586__ badalloc.C /tmp/cca00188.ii
GNU CPP version egcs-2.91.24 19980418 (gcc2 ss-980401 experimental)
(i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++
/usr/local/include
/usr/local/i586-pc-linux-gnulibc1/include
/usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.24/include
/usr/include
End of search list.
/usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.24/cc1plus
/tmp/cca00188.ii -quiet -dumpbase badalloc.cc -version -o /tmp/cca00188.s
GNU C++ version egcs-2.91.24 19980418 (gcc2 ss-980401 experimental)
(i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.24 19980418
(gcc2 ss-980401 experimental).
badalloc.C: In function `int main()':
badalloc.C:11: Internal compiler error 109.
badalloc.C:11: Please submit a full bug report to `egcs-bugs@cygnus.com'.
More information about the Gcc-bugs
mailing list