Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vmx / varargs-5.c
blobed551c2dfa93591b292ea82b24f9213c02c2282e
1 #include "harness.h"
2 #include <stdarg.h>
4 typedef struct n025
6 int m1;
7 double m2;
8 int m3;
9 vector signed int m4;
11 n025;
13 static void
14 varlistn025(int p1, double p2, va_list ap)
16 n025 q;
17 q.m1 = p1;
18 q.m2 = p2;
19 q.m3 = va_arg(ap, int);
20 q.m4 = va_arg(ap, vector signed int);
22 check(q.m1 == 1363477585, "q.m1");
23 check(q.m2 == -8.72e+18, "q.m2");
24 check(q.m3 == 198652649, "q.m3");
25 check(vec_all_eq(q.m4, ((vector signed int){323001541, -1353029458, 1756879633, -327031280})),
26 "q.m5");
30 void
31 varargsn025(int p1, double p2, ...)
33 n025 r, s;
34 va_list ap;
36 va_start(ap, p2);
37 r.m1 = p1;
38 r.m2 = p2;
39 r.m3 = va_arg(ap, int);
40 r.m4 = va_arg(ap, vector signed int);
41 va_end(ap);
43 check(r.m1 == 1363477585, "r.m1");
44 check(r.m2 == -8.72e+18, "r.m2");
45 check(r.m3 == 198652649, "r.m3");
46 check(vec_all_eq(r.m4, ((vector signed int){323001541, -1353029458, 1756879633, -327031280})),
47 "r.m5");
49 va_start(ap, p2);
50 s.m1 = p1;
51 s.m2 = p2;
52 s.m3 = va_arg(ap, int);
53 s.m4 = va_arg(ap, vector signed int);
54 va_end(ap);
56 check(s.m1 == 1363477585, "s.m1");
57 check(s.m2 == -8.72e+18, "s.m2");
58 check(s.m3 == 198652649, "s.m3");
59 check(vec_all_eq(s.m4, ((vector signed int){323001541, -1353029458, 1756879633, -327031280})),
60 "s.m5");
62 va_start(ap, p2);
63 varlistn025(p1, p2, ap);
64 va_end(ap);
67 static void test()
69 varargsn025(1363477585, -8.72e+18, 198652649,
70 ((vector signed int){323001541, -1353029458, 1756879633, -327031280}));