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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr28410.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 --param global-var-threshold=1" } */
3
 
4
extern void abort(void);
5
struct Bar { int p; };
6
struct Foo { struct Bar *p; };
7
struct Bar p0 = { 0 };
8
struct Bar p1 = { 1 };
9
void bar(struct Foo *f)
10
{
11
  f->p = &p0;
12
}
13
int foo(struct Foo *f)
14
{
15
  f->p->p = 1;
16
  bar(f);
17
  return f->p->p;
18
}
19
int main()
20
{
21
  struct Foo f;
22
  f.p = &p1;
23
  if (foo(&f) != 0)
24
    abort ();
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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