https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83644
Bug ID: 83644 Summary: ICE using type alias from recursive decltype in noexcept or return type Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 42996 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42996&action=edit Source of failing program The program (attached, and on https://godbolt.org/g/N6nHKk) ICEs as follows: bf@rahonavis /tmp> g++ -std=c++17 t.cpp t.cpp: In instantiation of 'compose(F&&, Fs&& ...)::<lambda(auto:1&& ...)> [with auto:1 = {int}; F = f()::<lambda(auto:2)>; Fs = {f()::<lambda(auto:3)>}]': t.cpp:32:72: required from here t.cpp:20:39: internal compiler error: Segmentation fault using tail_type = decltype(compose(std::forward<Fs>(fs)...)); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. To make it not fail, use the macro instead of the type alias, or comment out both the trailing return type and the noexcept.