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

--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
extern void abort (void);
int __attribute__((noipa)) foo ()
{
  return 1;
} 

int main()
{
  int res = foo ();
  if (res != 0)
    abort ();
}

Asks for call clobbered registers associated with user variables to be
preserved around calls.  In this case the value of 'res' ($eax on x86)
is no longer available when receiving SIGABRT, instead it's quickly
clobbered.

The more aggressive variant would be to force all user variables to the
stack (but then we still have to put saves around calls, in this case
it's similar to what Jakub says with uses after the call).

Reply via email to