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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr33870.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
struct X {
4
  int i;
5
  int a[4];
6
} m;
7
 
8
int a[4];
9
 
10
int __attribute__((noinline)) foo(int b)
11
{
12
  int (*p)[4] = b ? &a : &m.a;
13
  a[3] = 0;
14
  (*p)[3] = 1;
15
  return (*p)[3] + (*p)[2] + (*p)[1] + a[0] + a[3];
16
}
17
 
18
extern void abort (void);
19
 
20
int main()
21
{
22
  int i;
23
  for (i = 0; i < 4; ++i)
24
    a[i] = 0;
25
  if (foo(1) != 2)
26
    abort ();
27
  return 0;
28
}
29
 

powered by: WebSVN 2.1.0

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