https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61504
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed by r245538: PR c++/79533 - C++17 ICE with temporary cast to reference * call.c (build_over_call): Conversion to a reference prevents copy elision.