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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr51323.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR middle-end/51323 */
2
 
3
extern void abort (void);
4
struct S { int a, b, c; };
5
int v;
6
 
7
__attribute__((noinline, noclone)) void
8
foo (int x, int y, int z)
9
{
10
  if (x != v || y != 0 || z != 9)
11
    abort ();
12
}
13
 
14
static inline int
15
baz (const struct S *p)
16
{
17
  return p->b;
18
}
19
 
20
__attribute__((noinline, noclone)) void
21
bar (int x, struct S y)
22
{
23
  foo (baz (&y), 0, x);
24
}
25
 
26
int
27
main ()
28
{
29
  struct S s;
30
  v = 3; s.a = v - 1; s.b = v; s.c = v + 1;
31
  bar (9, s);
32
  v = 17; s.a = v - 1; s.b = v; s.c = v + 1;
33
  bar (9, s);
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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