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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr41404-1.c] - Blame information for rev 716

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/41404 */
2
/* { dg-do run } */
3
/* { dg-options "-g" } */
4
 
5
__attribute__ ((noinline))
6
int bar1 (int i)
7
{
8
  const char *foo = "foo";
9
  asm volatile ("" : "+r" (i) : : "memory");
10
  i++;  /* { dg-final { gdb-test 10 "*foo" "'f'" } } */
11
  asm volatile ("" : "+r" (i) : : "memory");
12
  foo = "bar";
13
  asm volatile ("" : "+r" (i) : : "memory");
14
  i++;  /* { dg-final { gdb-test 14 "*foo" "'b'" } } */
15
  asm volatile ("" : "+r" (i) : : "memory");
16
  return i;
17
}
18
 
19
__attribute__ ((noinline))
20
int bar2 (int i)
21
{
22
  const char *foo = "foo";
23
  asm volatile ("" : "+r" (i) : : "memory");
24
  i++;  /* { dg-final { gdb-test 24 "*foo" "'f'" } } */
25
  asm volatile ("" : "+r" (i) : : "memory");
26
  return i;
27
}
28
 
29
__attribute__ ((noinline))
30
const char *baz (int i)
31
{
32
  return i ? "foo" : "bar";
33
}
34
 
35
int
36
main (void)
37
{
38
  bar1 (6);
39
  bar2 (6);
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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