c++/5189: g++ -c bug.cpp crashed on simple stupid file

Reichelt reichelt@igpm.rwth-aachen.de
Fri Jan 4 08:40:00 GMT 2002


Hi,

the bug can be reproduced with an even simpler example:

struct A
{
    A(A&);
    template <class T> A(T);
};

A a = 0;

The compiler (g++ -c) seems to run into an endless loop which is killed
by the system when all virtual memory is exhausted. This affects gcc
3.0.x and the main trunk (gcc 3.1 as of 20011231) under i686-pc-linux-gnu.
However, gcc 2.95.2 does not have this problem.

See also http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00202.html
which is probably related.

Greetings,
Volker Reichelt

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5189




More information about the Gcc-bugs mailing list