https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116481

--- Comment #1 from Bruno Haible <bruno at clisp dot org> ---
A workaround is to declare the local variable 'tramp_address' volatile:

========================= foo.c =========================
extern void tramp ();

int is_trampoline (void* function)
{
  void* volatile tramp_address = tramp;
  if (!(((unsigned long)function & 3) == 2)) return 0;
  return ((long *) ((char*)function - 2))[0] == ((long *)
((char*)tramp_address-2))[0];
}
=========================================================

Then the compilation succeeds.

Reply via email to