This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51462] New: [c++0x] ICE in cx_check_missing_mem_inits
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Dec 2011 08:09:51 +0000
- Subject: [Bug c++/51462] New: [c++0x] ICE in cx_check_missing_mem_inits
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51462
Bug #: 51462
Summary: [c++0x] ICE in cx_check_missing_mem_inits
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
The following invalid code snippet triggers an ICE on trunk:
=============================
struct A
{
int i = 0;
};
struct B
{
A a;
constexpr B() : a(0) {}
};
=============================
bug.cc: In constructor 'constexpr B::B()':
bug.cc:9:22: error: no matching function for call to 'A::A(int)'
bug.cc:9:22: note: candidates are:
bug.cc:1:8: note: constexpr A::A()
bug.cc:1:8: note: candidate expects 0 arguments, 1 provided
bug.cc:1:8: note: constexpr A::A(const A&)
bug.cc:1:8: note: no known conversion for argument 1 from 'int' to 'const A&'
bug.cc:1:8: note: constexpr A::A(A&&)
bug.cc:1:8: note: no known conversion for argument 1 from 'int' to 'A&&'
bug.cc:9:25: internal compiler error: in cx_check_missing_mem_inits, at
cp/semantics.c:5999
Please submit a full bug report, [etc.]