https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484
Bug ID: 99484
Summary: [modules] ICE same canonical type node for different
types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: alexander.lelyakin at googlemail dot com
Target Milestone: ---
g++ -std=c++20 -fmodules-ts -x c++-system-header cstdalign
g++ -std=c++20 -fmodules-ts -x c++-system-header cuchar
g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem
g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
g++ -std=c++20 -fmodules-ts -x c++-system-header cstdarg
g++ -std=c++20 -fmodules-ts -x c++-system-header complex
g++ -std=c++20 -fmodules-ts -x c++-system-header cfloat
g++ -std=c++20 -fmodules-ts -x c++-system-header iomanip
----
In module /usr/local/include/c++/11.0.1/type_traits, imported at
/usr/local/include/c++/11.0.1/bits/move.h:57,
included from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59,
from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64,
from /usr/local/include/c++/11.0.1/bits/char_traits.h:39,
from /usr/local/include/c++/11.0.1/string:40,
from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
from /usr/local/include/c++/11.0.1/iomanip:40:
/usr/local/include/c++/11.0.1/type_traits: In substitution of ‘template<class
_Default, template<class ...> class _Op, class ... _Args> using __detected_or_t
= typename std::__detected_or<_Default, _Op, _Args ...>::type [with _Default =
typename std::__get_first_arg<_Tp>::type; _Op =
std::pointer_traits<_Ptr>::__element_type; _Args = {_Ptr}]’:
/usr/local/include/c++/11.0.1/bits/ptr_traits.h:105:65: required from here
/usr/local/include/c++/11.0.1/type_traits:2565:11: internal compiler error:
same canonical type node for different types ‘void’ and
‘std::__void_t<_Op<_Args ...> >’
2565 | using __detected_or_t
| ^~~~~~~~~~~~~~~
0xb7f5fd comptypes(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:1554
0xae491f template_args_equal(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/pt.c:9207
0xae4478 template_args_equal(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/pt.c:9170
0xae4478 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
../../gcc/gcc/cp/pt.c:9254
0xae4478 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
../../gcc/gcc/cp/pt.c:9234
0xaedd93 spec_hasher::equal(spec_entry*, spec_entry*)
../../gcc/gcc/cp/pt.c:1725
0xb338b6 hash_table<spec_hasher, false, xcallocator>::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1032
0xb33e5e hash_table<spec_hasher, false,
xcallocator>::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xaf0d3b add_mergeable_specialization(bool, spec_entry*, tree_node*, unsigned
int)
../../gcc/gcc/cp/pt.c:30018
0xa6ec5f trees_in::decl_value()
../../gcc/gcc/cp/module.cc:8068
0xa66d17 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9174
0xa6d36b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14858
0xa6d86d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18125
0xa6d92f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18779
0xa70b67 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18872
0xb2017f lookup_template_class_1
../../gcc/gcc/cp/pt.c:9799
0xb22516 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10237
0xb22516 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:13572
0xb16883 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:16033
0xb012a0 tsubst_decl
../../gcc/gcc/cp/pt.c:14798
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 20210308 (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.