This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78771] New: Internal compiler error when using inherited constructors
- From: "richardg.work at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Dec 2016 17:36:40 +0000
- Subject: [Bug c++/78771] New: Internal compiler error when using inherited constructors
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78771
Bug ID: 78771
Summary: Internal compiler error when using inherited
constructors
Product: gcc
Version: 5.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richardg.work at gmail dot com
Target Milestone: ---
The code below generates an internal compiler error.
Godbolt : https://godbolt.org/g/kgkbqy
<source>: In substitution of 'template<class U> D2::D2(U) [with U = int]':
<source>:23:12: required by substitution of 'template<class U> D2::D2(U)
[with U = int]'
<source>:26:28: required from here
<source>:23:12: internal compiler error: in instantiate_template_1, at
cp/pt.c:16113
using D1::D1;
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
First observed on Fedora 22 (gcc 5.4.0 built from source)
template <typename T>
struct StrictType
{
template <typename U>
StrictType(U) = delete;
constexpr StrictType(T t) : m_value(t) {}
T m_value {};
};
struct D2;
struct D1 : StrictType<int>
{
using StrictType<int>::StrictType;
D1(D2);
};
struct D2 : D1
{
using D1::D1;
};
D1::D1(D2 v) : D1(v.m_value) {}