This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/5571: crash in initialization of a static variable
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 1 Feb 2002 15:41:41 -0000
- Subject: c++/5571: crash in initialization of a static variable
- Reply-to: reichelt at igpm dot rwth-aachen dot de
>Number: 5571
>Category: c++
>Synopsis: crash in initialization of a static variable
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Fri Feb 01 07:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Volker Reichelt
>Release: gcc version 3.1 20020128 (experimental)
>Organization:
>Environment:
mips-sgi-irix6.5
>Description:
The following line of code produce an ICE when compiled
with optimization:
template <class T> struct A {};
struct B
{
static A<int> a;
void f() { a; }
};
A<int> B::a = A<int>();
The error message is:
bug.cpp: In function `void
__static_initialization_and_destruction_0(int, int)':
bug.cpp:9: Internal compiler error in simplify_gen_subreg, at
simplify-rtx.c:2687
Please submit a full bug report, [...]
Remarks:
* The example used to crash without optimization
producing a different error message (see PR 4909).
* It does not crash on i686-pc-linux-gnu.
>How-To-Repeat:
g++ -O -c bug.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: