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/] [pr33136-1.c] - Diff between revs 298 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 384
/* PR tree-optimization/33136 */
/* PR tree-optimization/33136 */
/* { dg-do run } */
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2" } */
 
 
extern void abort (void);
extern void abort (void);
 
 
struct S
struct S
{
{
  struct S *a;
  struct S *a;
  int b;
  int b;
  float f;
  float f;
};
};
 
 
static struct S s;
static struct S s;
 
 
static int *
static int *
__attribute__((noinline, const))
__attribute__((noinline, const))
foo (void)
foo (void)
{
{
  return &s.b;
  return &s.b;
}
}
 
 
float
float
__attribute__((noinline))
__attribute__((noinline))
bar (float *f)
bar (float *f)
{
{
  s.f = 1.0;
  s.f = 1.0;
  *f = 4.0;
  *f = 4.0;
  return s.f;
  return s.f;
}
}
 
 
int
int
__attribute__((noinline))
__attribute__((noinline))
baz (int *x)
baz (int *x)
{
{
  s.b = 1;
  s.b = 1;
  *x = 4;
  *x = 4;
  return s.b;
  return s.b;
}
}
 
 
int
int
t (void)
t (void)
{
{
  float f = 8.0;
  float f = 8.0;
  return bar (&f) + baz (foo ());
  return bar (&f) + baz (foo ());
}
}
 
 
int
int
main (void)
main (void)
{
{
  if (t () != 5)
  if (t () != 5)
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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