c++/5642: gcc3 crash
ivan_iv@armageddon.br.urbannet.ru
ivan_iv@armageddon.br.urbannet.ru
Sat Feb 9 11:16:00 GMT 2002
>Number: 5642
>Category: c++
>Synopsis: gcc3 crash
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 09 04:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Ivan Shvedunov
>Release: gcc-3.0.2
>Organization:
>Environment:
SuSE 7.3; uname -a:
Linux armageddon 2.4.16-4GB #1 Tue Dec 18 15:56:11 GMT 2001 i686 unknown
g++:
Configured with: ./configure --prefix=/opt/gcc3 --enable-shared --enable-threads --enable-cpp --enable-languages=c++,f77
Thread model: posix
gcc version 3.0.2
>Description:
The following piece of code (something like that was entered
by mistake) causes gcc3.0.2 to eat up all available memory
and crash ("gcc3crash.cpp"):
struct A {
A(A& v) {}
template<class T> A(T x) {}
};
void test()
{
A x = 12;
}
if you change A(A& v) to A(const A& v) (so it becomes
a normal copy constructor) the code compiles ok.
>How-To-Repeat:
g++ -c gcc3crash.cpp
>Fix:
don't know how to fix it
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list