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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-prof/] [bb-reorg.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-require-effective-target freorder } */
2
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
3
 
4
#include <string.h>
5
 
6
#define SIZE 1000
7
int t0 = 0;
8
const char *t2[SIZE];
9
char buf[SIZE];
10
 
11
void
12
foo (void)
13
{
14
  char *s = buf;
15
  t0 = 1;
16
 
17
  for (;;)
18
    {
19
      if (*s == '\0')
20
        break;
21
      else
22
        {
23
          t2[t0] = s;
24
          t0++;
25
        }
26
      *s++ = '\0';
27
    }
28
  t2[t0] = NULL;
29
}
30
 
31
 
32
int
33
main ()
34
{
35
  strcpy (buf, "hello");
36
  foo ();
37
  return 0;
38
}
39
 

powered by: WebSVN 2.1.0

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