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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr41317.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
extern void abort (void);
2
 
3
struct A
4
{
5
  int i;
6
};
7
struct B
8
{
9
  struct A a;
10
  int j;
11
};
12
 
13
static void
14
foo (struct B *p)
15
{
16
  ((struct A *)p)->i = 1;
17
}
18
 
19
int main()
20
{
21
  struct A a;
22
  a.i = 0;
23
  foo ((struct B *)&a);
24
  if (a.i != 1)
25
    abort ();
26
  return 0;
27
}
28
 

powered by: WebSVN 2.1.0

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