Comment # 3 on bug 1216000 from Richard Biener
a simple testcase

extern void abort (void);
int __attribute__((noipa)) foo ()
{
  return 1;
} 

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

shows that EAX is overwritten in abort () itself:

Watchpoint 3: $eax

Old value = 1
New value = -966940928
0x00007ffff7e0128a in abort () from /lib64/libc.so.6

The main issue in this testcase (as well as in yours I guess) is that
'result' isn't used after the call so the compiler sees no need to preserve
its value somewhere.


You are receiving this mail because: