OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr40657.c] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

/* Verify that that Thumb-1 epilogue size optimization does not clobber the
   return value.  */
 
long long v = 0x123456789abc;
 
__attribute__((noinline)) void bar (int *x)
{
  asm volatile ("" : "=m" (x) ::);
}
 
__attribute__((noinline)) long long foo()
{
  int x;
  bar(&x);
  return v;
}
 
int main ()
{
  if (foo () != v)
    abort ();
  exit (0);
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.