c++/5661: Gcc 3.0.3 Seg faults compiling bad code

Reichelt reichelt@igpm.rwth-aachen.de
Tue Feb 12 05:55:00 GMT 2002


Hi,

the problem can be reduced to the following code, which causes an ICE
with gcc 3.1 20020204 (experimental) on i686-pc-linux-gnu and
mips-sgi-irix6.5:

-------------------snip here--------------------
template <class T> struct A
{
    A() throw() {}
};

struct B
{
    static const int s;
    A<int[s]> a;  // illegal, constant value not known
};

const int B::s=16;

B b;
-------------------snip here--------------------

The error message is:

PR5661.cpp: In constructor `B::B()':
PR5661.cpp:14: internal error: Segmentation fault
Please submit a full bug report, [etc.]

Greetings,
Volker Reichelt


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




More information about the Gcc-bugs mailing list