Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / execute / va-arg-25.c
blobb9f3a1b1237fe86ba2010a5d3c91141c3f3164c5
1 /* Varargs and vectors! */
3 #include <stdarg.h>
4 #include <limits.h>
6 #define vector __attribute__((vector_size(16)))
8 const vector unsigned int v1 = {10,11,12,13};
9 const vector unsigned int v2 = {20,21,22,23};
11 void foo(int a, ...)
13 va_list args;
14 vector unsigned int v;
16 va_start (args, a);
17 v = va_arg (args, vector unsigned int);
18 if (a != 1 || memcmp (&v, &v1, sizeof (v)) != 0)
19 abort ();
20 a = va_arg (args, int);
21 if (a != 2)
22 abort ();
23 v = va_arg (args, vector unsigned int);
24 if (memcmp (&v, &v2, sizeof (v)) != 0)
25 abort ();
26 va_end (args);
29 int main(void)
31 #if INT_MAX == 2147483647
32 foo (1, (vector unsigned int){10,11,12,13}, 2,
33 (vector unsigned int){20,21,22,23});
34 #endif
35 return 0;