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-ssa/] [ssa-ccp-10.c] - Rev 298

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-fab" } */
 
/* Check that we fold strlen of equally long strings, and that we do not
   fail to terminate when there is a nontrivial cycle in the corresponding
   ssa graph.  */
 
extern __SIZE_TYPE__ strlen (const char *);
 
void foo(int i)
{
  char *s = "abcde";
 
  if (i)
    {
      s = "defgh";
      goto middle;
    }
 
start:
 
  bla ();
 
middle:
 
  if (bla ())
    goto start;
 
  bar (strlen (s));
}
 
/* There should be no calls to strlen.  */
/* { dg-final { scan-tree-dump-times "strlen" 0 "fab"} } */
/* { dg-final { cleanup-tree-dump "fab" } } */
 

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.