https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103105
Bug ID: 103105 Summary: [11 Regression] ICE iterative_hash_template_arg, at cp/pt.c:1790 Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jonathan.poelen at gmail dot com Target Milestone: --- $ cat test.cpp template<class...> struct list {}; template<bool> struct wrap_in_list_c {}; template<class x, class... xs> using wrap_in_list_if_convertible = wrap_in_list_c< 1 != (... + requires { x() = xs(); }) >; template<class... xs> using foo = list<wrap_in_list_if_convertible<xs, xs...>...>; using L = foo<int,int>; $ g++ -std=c++20 test.cpp test.cpp: In substitution of ‘template<class x, class ... xs> using wrap_in_list_if_convertible = wrap_in_list_c<(1 != (... +requires{x()= xs();}))> [with x = xs; xs = {xs ...}]’: test.cpp:15:55: required from here test.cpp:10:7: internal compiler error: in iterative_hash_template_arg, at cp/pt.c:1790 10 | using wrap_in_list_if_convertible = wrap_in_list_c< | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x1797368 internal_error(char const*, ...) ???:0 0x67f8f9 fancy_abort(char const*, int, char const*) ???:0 0x7d5ec1 iterative_hash_template_arg(tree_node*, unsigned int) ???:0 0x7d5d8f iterative_hash_template_arg(tree_node*, unsigned int) ???:0 0x7d5e12 iterative_hash_template_arg(tree_node*, unsigned int) ???:0 0x7d5d8f iterative_hash_template_arg(tree_node*, unsigned int) ???:0 0x7d5d8f iterative_hash_template_arg(tree_node*, unsigned int) ???:0 0x7d5ec1 iterative_hash_template_arg(tree_node*, unsigned int) ???:0 0x7e7d16 tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0x7f227c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ???:0 0x816d4d finish_template_type(tree_node*, tree_node*, int) ???:0 0x7ce2fe c_parse_file() ???:0 0x8a252d c_common_parse_file() ???:0 Works with g++-10: https://godbolt.org/z/KvM31Yq35