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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 688 jeremybenn
extern void abort(void);
2
struct test1
3
{
4
  int a;
5
  int b;
6
};
7
struct test2
8
{
9
  float d;
10
  struct test1 sub;
11
};
12
 
13
int global;
14
 
15
int bla(struct test1 *xa, struct test2 *xb)
16
{
17
  global = 1;
18
  xb->sub.a = 1;
19
  xa->a = 8;
20
  return xb->sub.a;
21
}
22
 
23
int main(void)
24
{
25
  struct test2 pom;
26
 
27
  if (bla (&pom.sub, &pom) != 8)
28
    abort ();
29
 
30
  return 0;
31
}
32
 

powered by: WebSVN 2.1.0

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