[Bug rtl-optimization/51447] [4.4/4.5/4.6/4.7 Regression] global register variable definition incorrectly removed as dead code
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 7 14:07:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51447
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 14:06:41 UTC ---
I think goto ptr can't be nonlocal, so that testcase indeed would be invalid.
register void *ptr asm ("rbx");
int
foo (void)
{
__label__ nonlocal_lab;
__attribute__((noinline, noclone)) void
bar (void *func)
{
ptr = func;
goto nonlocal_lab;
}
bar (&&nonlocal_lab);
return 1;
nonlocal_lab:
return ptr != &&nonlocal_lab;
}
ought to be valid though, this is normal non-local goto.
More information about the Gcc-bugs
mailing list