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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr47383.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run { target fpic } } */
2
/* { dg-options "-O2 -fPIC" } */
3
 
4
static int heap[2*(256 +1+29)+1];
5
static int heap_len;
6
static int heap_max;
7
void
8
__attribute__ ((noinline))
9
foo (int elems)
10
{
11
  int n, m;
12
  int max_code = -1;
13
  int node = elems;
14
  heap_len = 0, heap_max = (2*(256 +1+29)+1);
15
  for (n = 0; n < elems; n++)
16
    heap[++heap_len] = max_code = n;
17
  do {
18
    n = heap[1];
19
    heap[1] = heap[heap_len--];
20
    m = heap[1];
21
    heap[--heap_max] = n;
22
    heap[--heap_max] = m;
23
  } while (heap_len >= 2);
24
}
25
 
26
int
27
main ()
28
{
29
  foo (286);
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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