[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’

alexander.lelyakin at googlemail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 11 11:06:39 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484

--- Comment #2 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
One more similar, but not the same message;

g++ -std=c++20 -fmodules-ts -x c++-system-header any
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header sstream
g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
g++ -std=c++20 -fmodules-ts -x c++-system-header version
g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_set
g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
g++ -std=c++20 -fmodules-ts -x c++-system-header new
g++ -std=c++20 -fmodules-ts -x c++-system-header complex
----
In file included from /usr/local/include/c++/11.0.1/istream:39,
                 from /usr/local/include/c++/11.0.1/sstream:38,
of module /usr/local/include/c++/11.0.1/sstream, imported at
/usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/ostream: In instantiation of ‘struct
std::__is_convertible_to_basic_ostream<std::basic_ostream<char>&>’:
/usr/local/include/c++/11.0.1/ostream:773:5:   required by substitution of
‘template<class _Ostream, class _Tp> typename
std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >,
std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename
std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void>
>::value, typename
std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type
std::operator<<(_Ostream&&, const _Tp&) [with _Ostream =
std::basic_ostream<char>&; _Tp = std::complex<float>]’
/usr/local/include/c++/11.0.1/complex:1539:70:   required from here
/usr/local/include/c++/11.0.1/ostream:732:12: internal compiler error: same
canonical type node for different types ‘void’ and ‘std::__void_t<decltype
(std::__is_convertible_to_basic_ostream_test(declval<typename
std::remove_reference<_Tp>::type*>()))>’
  732 |     struct __is_convertible_to_basic_ostream
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xb7f8dd comptypes(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/typeck.c:1554
0xae4bff template_args_equal(tree_node*, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:9207
0xae4758 template_args_equal(tree_node*, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:9170
0xae4758 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
        ../../gcc/gcc/cp/pt.c:9254
0xae4758 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
        ../../gcc/gcc/cp/pt.c:9234
0xaee073 spec_hasher::equal(spec_entry*, spec_entry*)
        ../../gcc/gcc/cp/pt.c:1725
0xb33b96 hash_table<spec_hasher, false, xcallocator>::verify(spec_entry*
const&, unsigned int)
        ../../gcc/gcc/hash-table.h:1032
0xb3413e hash_table<spec_hasher, false,
xcallocator>::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
        ../../gcc/gcc/hash-table.h:968
0xaf101b add_mergeable_specialization(bool, spec_entry*, tree_node*, unsigned
int)
        ../../gcc/gcc/cp/pt.c:30018
0xa6ef5f trees_in::decl_value()
        ../../gcc/gcc/cp/module.cc:8068
0xa67017 trees_in::tree_node(bool)
        ../../gcc/gcc/cp/module.cc:9174
0xa6d66b module_state::read_cluster(unsigned int)
        ../../gcc/gcc/cp/module.cc:14858
0xa6db6d module_state::load_section(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18129
0xa6dc2f module_state::lazy_load(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18783
0xa70e67 lazy_load_pendings(tree_node*)
        ../../gcc/gcc/cp/module.cc:18876
0xb2045f lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:9799
0xb227f6 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:10237
0xb227f6 tsubst_aggr_type
        ../../gcc/gcc/cp/pt.c:13572
0xb2f505 instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:11882
0xb30f32 instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:12264
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
----
g++ (GCC) 11.0.1 20210310 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


More information about the Gcc-bugs mailing list