[Bug inline-asm/97708] Inline asm does not use the local register asm specified with register ... asm() as input
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 5 12:18:46 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97708
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |NEW
--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #25)
> Even if we wanted to do something about it (which I disagree with, e.g.
> given that the implementation matches the documentation), you run into the
> problem that even GIMPLE nor RTL differentiates between:
> void
> foo (void)
> {
> register int a __asm ("eax") = 1;
> __asm ("# %0 " : : "c" (a+0));
> __asm ("# %0 " : : "c" (a));
> }
> And "c" (a+0) unquestionably must be valid, it is just an expression that
> happens to be equal to a value of local register variable.
So it would need to be diagnosed in the FE (only), making a + 0 valid and
a not. Eh.
More information about the Gcc-bugs
mailing list