https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104316
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-01-31
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
NRV has:
static bool
dest_safe_for_nrv_p (gcall *call)
{
tree dest = gimple_call_lhs (call);
dest = get_base_address (dest);
if (! dest)
return false;
if (TREE_CODE (dest) == SSA_NAME)
return true;
if (call_may_clobber_ref_p (call, dest, false)
|| ref_maybe_used_by_stmt_p (call, dest, false))
return false;
return true;
}
Which is fine, the problem is the clobber list is not exactly flow senative, I
think there is another bug about that.