[middle-end PATCH] Prefer PLUS over IOR in RTL expansion of multi-word shifts/rotates.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 931004-6.c
blobbd66c83d5e5ad2b6eb7b867b64b10f44555a7e8c
1 #include <stdarg.h>
3 void abort (void);
4 void exit (int);
6 struct tiny
8 short c;
9 short d;
12 void
13 f (int n, ...)
15 struct tiny x;
16 int i;
18 va_list ap;
19 va_start (ap,n);
20 for (i = 0; i < n; i++)
22 x = va_arg (ap,struct tiny);
23 if (x.c != i + 10)
24 abort();
25 if (x.d != i + 20)
26 abort();
29 long x = va_arg (ap, long);
30 if (x != 123)
31 abort();
33 va_end (ap);
36 int
37 main (void)
39 struct tiny x[3];
40 x[0].c = 10;
41 x[1].c = 11;
42 x[2].c = 12;
43 x[0].d = 20;
44 x[1].d = 21;
45 x[2].d = 22;
46 f (3, x[0], x[1], x[2], (long) 123);
47 exit(0);