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/] [pr43329-1.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR debug/43329 */
2
/* { dg-do run } */
3
/* { dg-options "-g" } */
4
 
5
static inline void
6
foo (int argx)
7
{
8
  int varx = argx;
9
  __asm__ volatile ("nop");                     /* { dg-final { gdb-test 10 "argx" "25" } } */
10
  __asm__ volatile ("nop" : : "g" (varx));      /* { dg-final { gdb-test 10 "varx" "25" } } */
11
}
12
 
13
int i;
14
 
15
__attribute__((noinline))
16
void baz (int x)
17
{
18
  asm volatile ("" : : "r" (x) : "memory");
19
}
20
 
21
static inline void
22
bar (void)
23
{
24
  foo (25);
25
  i = i + 2;
26
  i = i * 2;
27
  i = i - 4;
28
  baz (i);
29
  i = i * 2;
30
  i = i >> 1;
31
  i = i << 6;
32
  baz (i);
33
  i = i + 2;
34
  i = i * 2;
35
  i = i - 4;
36
  baz (i);
37
  i = i * 2;
38
  i = i >> 6;
39
  i = i << 1;
40
  baz (i);
41
}
42
 
43
int
44
main (void)
45
{
46
  __asm__ volatile ("" : "=r" (i) : "0" (0));
47
  bar ();
48
  bar ();
49
  return i;
50
}

powered by: WebSVN 2.1.0

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