This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78488] New: ICE when building call to inherited default constructor.
- From: "eric at efcs dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Nov 2016 06:16:29 +0000
- Subject: [Bug c++/78488] New: ICE when building call to inherited default constructor.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78488
Bug ID: 78488
Summary: ICE when building call to inherited default
constructor.
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
GCC ICE's when default initializing a type T when T's default constructor is an
inherited constructor. Note that this only happens when T doesn't define its
own default ctor, either implicitly or explicitly.
The below reproducer is rejected by GCC 5.3 and earlier. GCC 6 exits with
status 1 and without producing any diagnostics or an output file, and GCC 7
segfaults.
Reproducer:
// g++ -std=c++1z test.cpp
struct Foo { Foo() {} };
struct Bar : Foo {
using Foo::Foo;
Bar(void*); // Define another constructor so Foo() isn't generated.
};
int main() {
Bar f;
}