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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [loop-17.c] - Rev 154

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

/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-sccp-details" } */
 
/* To determine the number of iterations in this loop we need to fold
   p_4 + 4B > p_4 + 8B to false.  This transformation has caused
   troubles in the past due to overflow issues.  */
 
int foo (int *p)
{
  int i = 0, *x;
 
  for (x = p; x < p + 2; x++)
    i++;
 
  return i;
}
 
/* { dg-final { scan-tree-dump "set_nb_iterations_in_loop = 2" "sccp" } } */
/* { dg-final { cleanup-tree-dump "sccp" } } */
 

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.