[Bug inline-asm/64119] asm triggers local register variable data corruption
adam at consulting dot net.nz
gcc-bugzilla@gcc.gnu.org
Sun Nov 30 22:57:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64119
Adam Warner <adam at consulting dot net.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |FIXED
--- Comment #5 from Adam Warner <adam at consulting dot net.nz> ---
The documentation is not clear. But your explanation is fantastic. Thank you
Andrew.
It's a big step to fully comprehend that reassignment to a local register
variable in GCC *does not work* to again make the register live for dataflow
analysis. The approach GCC has chosen is one of maximum surprise.
Thank you for describing a workaround: "create a new local register variable
each time and GCC won't optimize them away."
More information about the Gcc-bugs
mailing list