https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124660
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
Keywords| |missed-optimization
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-03-27
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We fail to emit CLOBBERs for the returns of f, or rather the C frontend fails
to
push appropriate cleanups.
void test1 ()
{
struct S D.2971;
struct S D.2970;
<bb 2> [local count: 1073741824]:
D.2970 = f (); [return slot optimization]
g (&D.2970.a);
D.2971 = f (); [return slot optimization]
g (&D.2971.a);
return;