https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109966
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> --- This looks like a failure of potential_prvalue_result_of to notice that there's copy elision taking place (when initializing a field of the array arr).