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/] [pr33136-1.c] - Rev 298

Compare with Previous | Blame | View Log

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

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.