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/] [20030606-1.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
 
2
int * foo (int *x, int b)
3
{
4
 
5
  *(x++) = 55;
6
  if (b)
7
    *(x++) = b;
8
 
9
  return x;
10
}
11
 
12
main()
13
{
14
  int a[5];
15
 
16
  memset (a, 1, sizeof (a));
17
 
18
  if (foo(a, 0) - a != 1 || a[0] != 55 || a[1] != a[4])
19
    abort();
20
 
21
  memset (a, 1, sizeof (a));
22
 
23
  if (foo(a, 2) - a != 2 || a[0] != 55 || a[1] != 2)
24
    abort();
25
 
26
  exit (0);
27
}

powered by: WebSVN 2.1.0

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