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/] [20000706-5.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
extern void abort(void);
2
extern void exit(int);
3
 
4
struct baz { int a, b, c; };
5
 
6
struct baz *c;
7
 
8
void bar(int b)
9
{
10
  if (c->a != 1 || c->b != 2 || c->c != 3 || b != 4)
11
    abort();
12
}
13
 
14
void foo(struct baz a, int b)
15
{
16
  c = &a;
17
  bar(b);
18
}
19
 
20
int main()
21
{
22
  struct baz a;
23
  a.a = 1;
24
  a.b = 2;
25
  a.c = 3;
26
  foo(a, 4);
27
  exit(0);
28
}

powered by: WebSVN 2.1.0

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