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.

Reply via email to