This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8564: internal compiler error in find_function_data, at function.c:329 with g++ 3.2
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, ron at vaniwaarden dot org, vaniwaar at ca dot metsci dot com
- Date: 14 Nov 2002 09:59:18 -0000
- Subject: Re: c++/8564: internal compiler error in find_function_data, at function.c:329 with g++ 3.2
- Reply-to: reichelt at igpm dot rwth-aachen dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, ron at vaniwaarden dot org, vaniwaar at ca dot metsci dot com, gcc-gnats at gcc dot gnu dot org
Synopsis: internal compiler error in find_function_data, at function.c:329 with g++ 3.2
State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Thu Nov 14 01:59:16 2002
State-Changed-Why:
Confirmed.
The bug can be demonstrated with the following code snippet:
----------------------------snip here--------------------------
class A { static char* p; };
int i = 1;
char* A::p = new char[i];
class B { B(); };
B::B() {}
----------------------------snip here--------------------------
This crashes gcc 3.0.x, 3.1 - 3.2.1, and mainline (just compile with
g++ -c) - with gcc 2.95.x, however, the code compiles fine.
So this is a regression from 2.95.x.
A workaround is to write "new char[1]" instead of "new char[i]"
(i.e. replace line 29675 by
char* SpParmSetDataItem::ret = new char[30];
in the file jj.C).
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8564