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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [compat/] [struct-ic.c] - Diff between revs 154 and 816

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

Rev 154 Rev 816
typedef struct {int a; char b;} T;
typedef struct {int a; char b;} T;
 
 
int h (T *);
int h (T *);
T g (T);
T g (T);
 
 
#if COMPILER != 1
#if COMPILER != 1
h (T *x)
h (T *x)
{
{
  if (x->a != 0 || x->b != 1)
  if (x->a != 0 || x->b != 1)
    abort ();
    abort ();
}
}
#endif
#endif
 
 
#if COMPILER != 2
#if COMPILER != 2
T
T
g (T x)
g (T x)
{
{
  if (x.a != 13 || x.b != 47)
  if (x.a != 13 || x.b != 47)
    abort ();
    abort ();
  x.a = 0;
  x.a = 0;
  x.b = 1;
  x.b = 1;
  h (&x);
  h (&x);
  return x;
  return x;
}
}
#endif
#endif
 
 
#if COMPILER != 1
#if COMPILER != 1
f ()
f ()
{
{
  T x;
  T x;
  x.a = 13;
  x.a = 13;
  x.b = 47;
  x.b = 47;
  g (x);
  g (x);
  if (x.a != 13 || x.b != 47)
  if (x.a != 13 || x.b != 47)
    abort ();
    abort ();
  x = g (x);
  x = g (x);
  if (x.a != 0 || x.b != 1)
  if (x.a != 0 || x.b != 1)
    abort ();
    abort ();
}
}
#endif
#endif
 
 
#if COMPILER != 2
#if COMPILER != 2
main ()
main ()
{
{
  f ();
  f ();
  exit (0);
  exit (0);
}
}
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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