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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr43177.c] - Rev 826

Compare with Previous | Blame | View Log

/* { dg-do run } */
/* { dg-options "-g" } */
 
void __attribute__((noinline))
bar (long x)
{
  asm volatile ("" : : "r" (x) : "memory");
}
 
long __attribute__((noinline))
foo (long x)
{
  long l = x + 3;
  bar (l);/* { dg-final { gdb-test 15 "l" "10" } } */
  bar (l);/* { dg-final { gdb-test 15 "x" "7" } } */
  return l;
}
 
long __attribute__((noinline))
baz (int x)
{
  long l = x + 3;
  bar (l);/* { dg-final { gdb-test 24 "l" "10" } } */
  bar (l);/* { dg-final { gdb-test 24 "x" "7" } } */
  return l;
}
 
int
main (void)
{
  int i;
  asm volatile ("" : "=r" (i) : "0" (7));
  foo (i);
  baz (i);
  return 0;
}
 

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.