This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71368] New: [concepts] ICE on constrained compound requirement
- From: "lucdanton at free dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Jun 2016 09:36:38 +0000
- Subject: [Bug c++/71368] New: [concepts] ICE on constrained compound requirement
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71368
Bug ID: 71368
Summary: [concepts] ICE on constrained compound requirement
Product: gcc
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: lucdanton at free dot fr
Target Milestone: ---
The following produces an ICE on both GCC 6.1 and trunk (rev. 236974):
$ cat main.cpp
struct inner;
template<typename X> concept bool CompoundReq = requires {
// fine with concrete type in trailing type, i.e. inner& instead of X&
{ X::inner_member() } -> X&;
};
template<typename X> concept bool Concept = requires {
{ X::outer_member() } -> CompoundReq;
};
struct inner { static inner& inner_member(); };
struct outer { static inner outer_member(); };
int main()
{
// fine
static_assert( CompoundReq<inner> );
static_assert( CompoundReq<decltype( outer::outer_member() )> );
// ICE
static_assert( Concept<outer> );
}
$ g++-trunk -std=c++1z -fconcepts main.cpp
g++-trunk: internal compiler error: Segmentation fault (program cc1plus)