https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110114
Bug ID: 110114 Summary: ICE on calling overloaded function in case of incomplete argument type Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This program struct A { int a,b; }; struct B; void foo(const A &) {} void foo(const B &) {} int main() { foo({.a=0}); } is accepted by Clang and MSVC, but GCC 13 crashes on it with the message: <source>:11:8: internal compiler error: Segmentation fault 11 | foo({.a=0}); | ~~~^~~~~~~~ 0x1ce67fe internal_error(char const*, ...) ???:0 0x751149 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ???:0 0x8eaa5c finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ???:0 0x89f99b c_parse_file() ???:0 0x98c2b9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Online demo: https://godbolt.org/z/z7KPGrWsz