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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr45882.c] - Rev 774

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

/* PR debug/45882 */
/* { dg-do run } */
/* { dg-options "-g" } */
 
extern void abort (void);
int a[1024];
volatile short int v;
 
__attribute__((noinline,noclone,used)) int
foo (int i, int j)
{
  int b = i;		/* { dg-final { gdb-test 16 "b" "7" } } */
  int c = i + 4;	/* { dg-final { gdb-test 16 "c" "11" } } */
  int d = a[i];		/* { dg-final { gdb-test 16 "d" "112" } } */
  int e = a[i + 6];	/* { dg-final { gdb-test 16 "e" "142" } } */
  ++v;
  return ++j;
}
 
int
main (void)
{
  int l;
  asm ("" : "=r" (l) : "0" (7));
  a[7] = 112;
  a[7 + 6] = 142;
  if (foo (l, 7) != 8)
    abort ();
  return l - 7;
}
 

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.