https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108047
Sergei Trofimovich changed:
What|Removed |Added
CC||slyfox at gcc dot gnu.org
--- Comment #4 from Sergei Trofimovich ---
Noticed the same build failure on this week's gcc on apache-arrow-cpp-9.0.0.
Extracted small example:
namespace std {
template class initializer_list;
struct Trans_NS___cxx11_basic_string {
Trans_NS___cxx11_basic_string(const char *);
};
struct vector {
vector(initializer_list);
};
} // namespace std
void key_value_metadata(std::vector, std::vector);
template void TestWriteDifferentMetadata() {
key_value_metadata({}, {""});
}
Not sure if it's valid, but gcc-12 still accepts it. Can re-reduce against
clang if needed.
$ ./gcc-git/bin/gcc -c bug.cc.cc
bug.cc.cc: In function 'void TestWriteDifferentMetadata()':
bug.cc.cc:12:21: internal compiler error: unexpected expression
'(std::Trans_NS___cxx11_basic_string)""' of kind implicit_conv_expr
12 | key_value_metadata({}, {""});
| ~~^~
0x219cf54 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char
const*, __va_list_tag (*) [1], diagnostic_t)
???:0
0x219dba6 internal_error(char const*, ...)
???:0
0x9d4fee cxx_eval_constant_expression(constexpr_ctx const*, tree_node*,
value_cat, bool*, bool*, tree_node**)
???:0