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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [20050330-2.c] - Diff between revs 298 and 378

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

Rev 298 Rev 378
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-generate" } */
/* { dg-options "-O2 -fprofile-generate" } */
 
 
struct S
struct S
{
{
  int a;
  int a;
  void **b;
  void **b;
};
};
 
 
void
void
foo (struct S *x, int y)
foo (struct S *x, int y)
{
{
  if (!x)
  if (!x)
    return;
    return;
  if (y >= x->a)
  if (y >= x->a)
    return;
    return;
  x->a--;
  x->a--;
  for (; y < x->a; y++)
  for (; y < x->a; y++)
    x->b[y] = x->b[y + 1];
    x->b[y] = x->b[y + 1];
  x->b[x->a] = (void *) 0;
  x->b[x->a] = (void *) 0;
}
}
 
 
/* { dg-final { cleanup-coverage-files } } */
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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