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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr43177.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
/* { dg-do run } */
2
/* { dg-options "-g" } */
3
 
4
void __attribute__((noinline))
5
bar (long x)
6
{
7
  asm volatile ("" : : "r" (x) : "memory");
8
}
9
 
10
long __attribute__((noinline))
11
foo (long x)
12
{
13
  long l = x + 3;
14
  bar (l);/* { dg-final { gdb-test 15 "l" "10" } } */
15
  bar (l);/* { dg-final { gdb-test 15 "x" "7" } } */
16
  return l;
17
}
18
 
19
long __attribute__((noinline))
20
baz (int x)
21
{
22
  long l = x + 3;
23
  bar (l);/* { dg-final { gdb-test 24 "l" "10" } } */
24
  bar (l);/* { dg-final { gdb-test 24 "x" "7" } } */
25
  return l;
26
}
27
 
28
int
29
main (void)
30
{
31
  int i;
32
  asm volatile ("" : "=r" (i) : "0" (7));
33
  foo (i);
34
  baz (i);
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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