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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr36373-4.c] - Diff between revs 816 and 826

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

Rev 816 Rev 826
/* { dg-do run } */
/* { dg-do run } */
 
 
extern void abort (void);
extern void abort (void);
struct Foo {
struct Foo {
    int *p;
    int *p;
    int *q;
    int *q;
};
};
struct Foo __attribute__((noinline))
struct Foo __attribute__((noinline))
bar(int *p)
bar(int *p)
{
{
  struct Foo f;
  struct Foo f;
  f.p = p;
  f.p = p;
  return f;
  return f;
}
}
void __attribute__((noinline))
void __attribute__((noinline))
foo(struct Foo f)
foo(struct Foo f)
{
{
  *f.p = 0;
  *f.p = 0;
}
}
int main()
int main()
{
{
  int a, b;
  int a, b;
  a = 0;
  a = 0;
  b = 1;
  b = 1;
  struct Foo f;
  struct Foo f;
  f = bar (&b);
  f = bar (&b);
  f.q = &a;
  f.q = &a;
  foo(f);
  foo(f);
  if (b != 0)
  if (b != 0)
    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.