c++/5247: g++ depletes virtual memory while compiling
Peter Schmid
schmid@snake.iap.physik.tu-darmstadt.de
Wed Jan 2 07:56:00 GMT 2002
>Number: 5247
>Category: c++
>Synopsis: g++ depletes virtual memory while compiling
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Jan 02 07:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Peter Schmid
>Release: 3.1 20011229 (experimental)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.16 #6 Wed Dec 26 16:44:07 CET 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
SuSE 7.3
glibc 2.2.4
GNU ld version 2.11.90.0.29
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads --enable-languages=c,c++,f77,objc --enable-concept-checks
>Description:
The following source p.C causes an ice. g++ consumes all virtual
memory until the process is killed by the kernel. When the second
parameter to the a constructor is removed the code compiles
>How-To-Repeat:
Source code p.C
struct a {
a (int, const a & = 0) { }
};
int main ()
{
a b (0);
}
g++ -v -W -Wall p.C -W -Wall -save-temps
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads --enable-languages=c,c++,f77,objc --enable-concept-checks
Thread model: posix
gcc version 3.1 20011229 (experimental)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cpp0 -lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ p.C p.ii
GNU CPP version 3.1 20011229 (experimental) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++-v3
/usr/local/include/g++-v3/i686-pc-linux-gnu
/usr/local/include/g++-v3/backward
/usr/local/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
/usr/include
End of search list.
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -fpreprocessed p.ii -quiet -dumpbase p.C -W -Wall -W -Wall -version -o p.s
GNU CPP version 3.1 20011229 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20011229 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.1 20011229 (experimental).
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Preprocessed source code p.ii
# 1 "p.C"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "p.C"
struct a {
a (int, const a & = 0) { }
};
int main ()
{
a b (0);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
>normally. Compiling p.C crashes all g++ compilers I have access
>to (gcc 2.95.3, gcc 3.03 anf gcc 3.1).
More information about the Gcc-bugs
mailing list