[Bug c++/35734] New: [4.3/4.4 regression] ICE with copy constructor in derived class
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 28 17:33:00 GMT 2008
The following valid code snippet triggers an ICE since GCC 4.3.0
when compiled with "-W":
=========================================
struct A
{
A();
template<typename T> A(const T&);
};
struct B : A
{
B(const B&) {}
};
=========================================
bug.cc: In copy constructor 'B::B(const B&)':
bug.cc:9: internal compiler error: tree check: expected function_decl, have
template_decl in type_has_user_nondefault_constructor, at cp/class.c:4063
Please submit a full bug report, [etc.]
In earlier versions we issued the warning:
bug.cc: In copy constructor 'B::B(const B&)':
bug.cc:9: warning: base class 'struct A' should be explicitly initialized in
the copy constructor
--
Summary: [4.3/4.4 regression] ICE with copy constructor in
derived class
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, 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=35734
More information about the Gcc-bugs
mailing list