https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99643
Bug ID: 99643 Summary: internal compiler error in build_over_call, involving array new and copy elision Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ensadc at mailnesia dot com Target Milestone: --- https://godbolt.org/z/8TWG9d ==== struct Foo {}; Foo get_foo(); int main() { new Foo[1]{get_foo()}; } ==== <source>: In function 'int main()': <source>:5:25: internal compiler error: in build_over_call, at cp/call.c:9360 5 | new Foo[1]{get_foo()}; | ^ 0x1cfa0d9 internal_error(char const*, ...) ???:0 0x6ba797 fancy_abort(char const*, int, char const*) ???:0 0x6df07c build_new_method_call(...) ???:0 0x6e07e0 build_special_member_call(...) ???:0 0x76a7cf ocp_convert(...) ???:0 0x7f46a8 build_aggr_init(tree_node*, tree_node*, int, int) ???:0 0x7f30c0 build_vec_init(...) ???:0 0x7f8051 build_new(...) ???:0 0x8e12dd c_parse_file() ???:0 0xa5f8d2 c_common_parse_file() ???:0 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. ==== This seems like a regression from GCC 10.