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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20041126-1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
extern int abs (int);
2
extern void abort (void);
3
 
4
void
5
check (int *p)
6
{
7
  int i;
8
  for (i = 0; i < 5; ++i)
9
    if (p[i])
10
      abort ();
11
  for (; i < 10; ++i)
12
    if (p[i] != i + 1)
13
      abort ();
14
}
15
 
16
int
17
main (void)
18
{
19
  int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
20
  int i;
21
 
22
  for (i = -5; i < 0; i++)
23
    a[abs (i - 10) - 11] = 0;
24
  check (a);
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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