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

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

Line No. Rev Author Line
1 149 jeremybenn
 
2
int x[10] = { 0,1,2,3,4,5,6,7,8,9};
3
 
4
int
5
main()
6
{
7
  int niterations = 0, i;
8
 
9
  for (;;) {
10
    int i, mi, max;
11
    max = 0;
12
    for (i = 0; i < 10 ; i++) {
13
      if (x[i] > max) {
14
        max = x[i];
15
        mi = i;
16
      }
17
    }
18
    if (max == 0)
19
      break;
20
    x[mi] = 0;
21
    niterations++;
22
    if (niterations > 10)
23
      abort ();
24
  }
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.