https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90301
Bug ID: 90301 Summary: RangeV3 usage, ICE internal compiler error: canonical types differ for identical types Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cuzdav at gmail dot com Target Milestone: --- Created attachment 46270 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46270&action=edit full output from compiler (since it's long) On Godbolt, version 8.3 and releases before it, this compiles. It compiles in Clang from trunk back to version 5. On the current g++ TRUNK version, it fails in -std=c++17 mode and -std=c++2a mode. (But it SUCCEEDS in TRUNK -std=c++14 mode) I didn't dig into rangeV3 implementation, so it may resemble some other existing reports: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89766 Here's the complete, minimal, reproducible extraction of the code triggering the bug //--------------------------------------------- #include <range/v3/numeric.hpp> #include <range/v3/view/filter.hpp> int g() { int v[]{1, 2, 3}; return ranges::v3::accumulate( v | ranges::v3::view::filter([](int){return true;}), 0); } //--------------------------------------------- side-by-side on Godbolt: https://godbolt.org/z/q9z4mI OUTPUT: /opt/compiler-explorer/libs/rangesv3/trunk/include/range/v3/utility/compressed_pair.hpp:51:27: internal compiler error: canonical types differ for identical types 'std::integral_constant<bool, and_v<std::is_constructible<Ts, Args>::type::value ...> >' and 'std::integral_constant<bool, and_v<std::is_constructible<Ts, Args>::type::value ...> >' 51 | constexpr compressed_tuple_(Args &&... args) | ^~~~~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1 (Full output is attached)