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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20050613-1.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* PR tree-optimization/22043 */
2
 
3
extern void abort (void);
4
 
5
struct A { int i; int j; int k; int l; };
6
struct B { struct A a; int r[1]; };
7
struct C { struct A a; int r[0]; };
8
struct D { struct A a; int r[]; };
9
 
10
void
11
foo (struct A *x)
12
{
13
  if (x->i != 0 || x->j != 5 || x->k != 0 || x->l != 0)
14
    abort ();
15
}
16
 
17
int
18
main ()
19
{
20
  struct B b = { .a.j = 5 };
21
  struct C c = { .a.j = 5 };
22
  struct D d = { .a.j = 5 };
23
  foo (&b.a);
24
  foo (&c.a);
25
  foo (&d.a);
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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