This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12316] New: [3.4 regression] trouble with garbage collection
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2003 11:56:02 -0000
- Subject: [Bug c++/12316] New: [3.4 regression] trouble with garbage collection
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12316
Summary: [3.4 regression] trouble with garbage collection
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
Consider the following preprocessed code snippet:
---------------------------------------------------------
inline void FOO() {}
template<typename> struct A
{
A() {}
~A() throw() {}
};
template<typename> struct B
{
static void foo();
static void bar() { foo(); }
};
struct C {};
template<typename> struct D : C
{
D() {}
~D() { B<void>::bar(); }
};
template<typename> struct E : D<void>
{
static void baz() {}
E(A<void>) { baz(); }
};
void BAR()
{
new E<void>(A<void>());
}
---------------------------------------------------------
Compiling it on i686-pc-linux-gnu with mainline using the command
g++ --param ggc-min-expand=0 --param ggc-min-heapsize=0 -c gc.ii
I get the message
virtual memory exhausted: Invalid argument
which looks like a garbage collection problem.
(Although we don't get an "Internal comiler error" message, I'd
call that an internal error, hence the "ice-on-valid-code" keyword.)
It's a regression that appeared on 20030910 with Richard's patch
http://gcc.gnu.org/ml/gcc-cvs/2003-09/msg00275.html
I don't know whether it's the cause for the problems or just
triggers the bug.