summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compat/struct-ret-1.c
blob: a585c8fdb40091d2324d9150f401f0dd9e41a3f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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