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/] [pr41317.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
 
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.