c++/8186: ICE in cp_expr_size, at cp/cp-lang.c:304
Reichelt
reichelt@igpm.rwth-aachen.de
Thu Oct 10 13:51:00 GMT 2002
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
More information about the Gcc-bugs
mailing list