view gcc/testsuite/gcc.c-torture/compat/struct-ret-1.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

typedef struct { int re; int im; } T;

T f (int, int);

#if COMPILER != 1
T
f (int arg1, int arg2)
{
  T x;
  x.re = arg1;
  x.im = arg2;
  return x;
}
#endif

#if COMPILER != 2
main ()
{
  T result;
  result = f (3, 4);
  if (result.re != 3 || result.im != 4)
    abort ();
  exit (0);
}
#endif