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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [compat/] [struct-i.c] - Diff between revs 149 and 154

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

Rev 149 Rev 154
typedef struct {int a;} T;
typedef struct {int a;} 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 != 47114711)
  if (x->a != 47114711)
    abort ();
    abort ();
}
}
#endif
#endif
 
 
#if COMPILER != 2
#if COMPILER != 2
T
T
g (T x)
g (T x)
{
{
  if (x.a != 13)
  if (x.a != 13)
    abort ();
    abort ();
  x.a = 47114711;
  x.a = 47114711;
  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;
  g (x);
  g (x);
  if (x.a != 13)
  if (x.a != 13)
    abort ();
    abort ();
  x = g (x);
  x = g (x);
  if (x.a != 47114711)
  if (x.a != 47114711)
    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.