This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8186: ICE in cp_expr_size, at cp/cp-lang.c:304
- From: Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jh at suse dot cz, nobody at gcc dot gnu dot org
- Date: Thu, 10 Oct 2002 23:40:47 +0200
- Subject: Re: c++/8186: ICE in cp_expr_size, at cp/cp-lang.c:304
Hi,
the PR can be reduced to the following code snippet:
----------------------snip here--------------------
#include<string>
struct C
{
C (std::string) {}
};
void foo ()
{
throw C(std::string());
}
----------------------snip here--------------------
This can be further reduced to:
----------------------snip here--------------------
struct A
{
A ();
A (const A&);
};
struct B
{
A a;
B& operator= (const B&);
};
struct C
{
C (B) {}
};
void foo ()
{
throw C(B());
}
----------------------snip here--------------------
Compiling with "g++ -O -c" the main trunk (as of 20021007) crashes
with the message (checked on i686-pc-linux-gnu and mips-sgi-irix6.5):
bug.cc: In function `void foo()':
bug.cc:15: internal compiler error: in cp_expr_size, at cp/cp-lang.c:304
Please submit a full bug report, [etc.]
The 3.2-branch and previous versions are not affected.
Greetings,
Volker Reichelt
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8186