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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-prof/] [bb-reorg.c] - Rev 801

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

/* { dg-require-effective-target freorder } */
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
 
#include <string.h>
 
#define SIZE 1000
int t0 = 0;
const char *t2[SIZE];
char buf[SIZE];
 
void
foo (void)
{
  char *s = buf;
  t0 = 1;
 
  for (;;)
    {
      if (*s == '\0')
	break;
      else
	{
	  t2[t0] = s;
	  t0++;
	}
      *s++ = '\0';
    }
  t2[t0] = NULL;
}
 
 
int
main ()
{
  strcpy (buf, "hello");
  foo ();
  return 0; 
}
 
 

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

powered by: WebSVN 2.1.0

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