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] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/45882 */
2
/* { dg-do run } */
3
/* { dg-options "-g" } */
4
 
5
extern void abort (void);
6
int a[1024];
7
volatile short int v;
8
 
9
__attribute__((noinline,noclone,used)) int
10
foo (int i, int j)
11
{
12
  int b = i;            /* { dg-final { gdb-test 16 "b" "7" } } */
13
  int c = i + 4;        /* { dg-final { gdb-test 16 "c" "11" } } */
14
  int d = a[i];         /* { dg-final { gdb-test 16 "d" "112" } } */
15
  int e = a[i + 6];     /* { dg-final { gdb-test 16 "e" "142" } } */
16
  ++v;
17
  return ++j;
18
}
19
 
20
int
21
main (void)
22
{
23
  int l;
24
  asm ("" : "=r" (l) : "0" (7));
25
  a[7] = 112;
26
  a[7 + 6] = 142;
27
  if (foo (l, 7) != 8)
28
    abort ();
29
  return l - 7;
30
}

powered by: WebSVN 2.1.0

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