[Bug middle-end/124658] Explicit register variable bound to eax is corrupted by function return values under -O2 optimization

xry111 at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 27 17:22:58 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124658

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Specifically:

"Defining a register variable does not reserve the register.  Other than
when invoking the Extended ‘asm’, the contents of the specified register
are not guaranteed."


More information about the Gcc-bugs mailing list