https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110434
Bug ID: 110434 Summary: tree-nrv introduces incorrect CLOBBER(eol) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: kristerw at gcc dot gnu.org Target Milestone: --- The tree-nrv pass may introduce incorrect CLOBBER(eol) of the form <retval> ={v} {CLOBBER(eol)}; return <retval>; One example of this can be seen by compiling gcc.c-torture/execute/921204-1.c for x86 using the flags "-O -m32", where it changes the IR union bu o; ... o = i; MEM[(union *)&o].b18 = _11; MEM[(union *)&o].b20 = _11; <retval> = o; o ={v} {CLOBBER(eol)}; return <retval>; to just use <retval> instead of o union bu o [value-expr: <retval>]; ... <retval> = i; MEM[(union *)&<retval>].b18 = _11; MEM[(union *)&<retval>].b20 = _11; <retval> ={v} {CLOBBER(eol)}; return <retval>; so the CLOBBER(eol) now refers to <retval>.