This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35734] New: [4.3/4.4 regression] ICE with copy constructor in derived class
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2008 17:32:42 -0000
- Subject: [Bug c++/35734] New: [4.3/4.4 regression] ICE with copy constructor in derived class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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