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.dg/] [tree-prof/] [bb-reorg.c] - Blame information for rev 298

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.