https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79982
Bug ID: 79982 Summary: Compiler crashes when using illegal concepts (nested requirements) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: gcc.bugzilla at cpockrandt dot de Target Milestone: --- Created attachment 40939 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40939&action=edit output when compiler crashes I'm using the latest snapshot of g++-7 (7-20170305) and compile with "-fconcepts -std=c++17". When using nested requirements with "auto" or when the type inside the requirements is not known, the compiler crashes. template <typename T> concept bool my_concept = requires(T t) { requires requires (int val) { { t.serialize(val) } -> void; }; }; class my_class { void serialize(int); }; static_assert(my_concept<my_class>); The compiler *also* crashes with this line of code (not sure whether it's actually illegal code or not) requires requires (T t, auto val) { { t.serialize(val) } -> void; }; Complete crash output and both code samples are attached.