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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20071018-1.c] - Diff between revs 297 and 338

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

Rev 297 Rev 338
extern void abort(void);
extern void abort(void);
 
 
struct foo {
struct foo {
  int rank;
  int rank;
  char *name;
  char *name;
};
};
 
 
struct mem {
struct mem {
  struct foo *x[4];
  struct foo *x[4];
};
};
 
 
void __attribute__((noinline)) bar(struct foo **f)
void __attribute__((noinline)) bar(struct foo **f)
{
{
  *f = __builtin_malloc(sizeof(struct foo));
  *f = __builtin_malloc(sizeof(struct foo));
}
}
struct foo * foo(int rank)
struct foo * foo(int rank)
{
{
  void *x = __builtin_malloc(sizeof(struct mem));
  void *x = __builtin_malloc(sizeof(struct mem));
  struct mem *as = x;
  struct mem *as = x;
  struct foo **upper = &as->x[rank * 8 - 1];
  struct foo **upper = &as->x[rank * 8 - 1];
  *upper = 0;
  *upper = 0;
  bar(upper);
  bar(upper);
  return *upper;
  return *upper;
}
}
 
 
int main()
int main()
{
{
  if (foo(0) == 0)
  if (foo(0) == 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.