[Bug c++/27379] New: [4.0/4.1/4.2 regression] ICE on invalid copy-ctor declaration
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue May 2 09:23:00 GMT 2006
The following invalid code snippet ICEs with a segfault since GCC 3.4.0
(it also crashed with GCC 3.0.x):
=======================================================
struct A
{
A(const A&) !;
};
void foo(A b)
{
A a(b);
}
=======================================================
bug.cc:3: error: expected ';' before '!' token
bug.cc: In function 'void foo(A)':
bug.cc:8: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
The following slightly longer example crashes with a different ICE:
=======================================================
struct A
{
A(const A&) !;
};
struct B : A {};
void foo(B b)
{
B c(b);
}
=======================================================
bug.cc:3: error: expected ';' before '!' token
bug.cc: In function 'void foo(B)':
bug.cc:10: internal compiler error: vector VEC(tree,base) index domain error,
in locate_copy at cp/method.c:930
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1/4.2 regression] ICE on invalid copy-ctor
declaration
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27379
More information about the Gcc-bugs
mailing list