https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128075
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.5
Last reconfirmed| |2026-10-21
Status|UNCONFIRMED |NEW
Summary|wrong code at -O1 and above |[14/15/16/17 regression]
|when a nested function |wrong code at -O1 and above
|returns the address of a |when a nested function
|local of its containing |returns the address of a
|function |local of its containing
| |function
Ever confirmed|0 |1
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
bool can_be_returned;
if (gimple_call_lhs (call))
{
int af = gimple_call_arg_flags (call, i);
can_be_returned = !(af & EAF_NOT_RETURNED_DIRECTLY);
}
else
can_be_returned = false;
ret |= build_access_from_call_arg (gimple_call_arg (call,
i),
stmt, can_be_returned,
&oe_check);
}
if (gimple_call_chain(stmt))
ret |= build_access_from_call_arg (gimple_call_chain(call),
stmt, false, &oe_check);
The false for the call to build_access_from_call_arg seems wrong.