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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pta-field-2.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
struct Foo {
2
  int *p;
3
  int *q;
4
};
5
 
6
void __attribute__((noinline))
7
bar (int **x)
8
{
9
  struct Foo *f = (struct Foo *)(x - 1);
10
  *(f->p) = 0;
11
}
12
 
13
int foo(void)
14
{
15
  struct Foo f;
16
  int i = 1, j = 2;
17
  f.p = &i;
18
  f.q = &j;
19
  bar(&f.q);
20
  return i;
21
}
22
 
23
extern void abort (void);
24
int main()
25
{
26
  if (foo () != 0)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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