OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20031113-1.c] - Diff between revs 298 and 384

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 384
/* PR optimization/12640
/* PR optimization/12640
 
 
   We used to get into an infinite loop while trying to
   We used to get into an infinite loop while trying to
   figure out `strlen (resultString)'.  This showed up as
   figure out `strlen (resultString)'.  This showed up as
   a stack overflow while compiling tk.  */
   a stack overflow while compiling tk.  */
 
 
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O1" } */
/* { dg-options "-O1" } */
 
 
extern __SIZE_TYPE__ strlen (const char *);
extern __SIZE_TYPE__ strlen (const char *);
 
 
int i;
int i;
 
 
static void
static void
SendEventProc (char *resultString)
SendEventProc (char *resultString)
{
{
  char *p;
  char *p;
 
 
  resultString = "";
  resultString = "";
  while (*p == '-')
  while (*p == '-')
    {
    {
      if (p[2] == ' ')
      if (p[2] == ' ')
        {
        {
          resultString = p + 3;
          resultString = p + 3;
        }
        }
    }
    }
  for (;;)
  for (;;)
    {
    {
      i = strlen (resultString) + 1;
      i = strlen (resultString) + 1;
    }
    }
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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