[Bug inline-asm/87984] [7/8/9 Regression] wrong code for local reg var input to asm
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 3 17:16:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87984
--- Comment #15 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Typo: PR 42491 should have said PR 43491.
Hopefully more obviously-broken testcase with an inline function:
static inline void
ff(int *o)
{
register int a asm("eax");
a = 1;
asm("add %1, %0" : "+g"(*o) : "r"(a));
}
int f(void)
{
int o=0, i;
for (i=0; i<3; i++) {
ff(&o);
asm("xor %%eax, %%eax" ::: "eax");
}
return o;
}
More information about the Gcc-bugs
mailing list