S/390: Vector base support - testcases
[gcc.git] / gcc / testsuite / gcc.target / s390 / vector / vec-abi-vararg-2.c
1 /* Check calling convention in the vector ABI. */
2
3 /* { dg-do compile { target { s390*-*-* } } } */
4 /* { dg-options "-O3 -mzarch -march=z13 -Wno-implicit-function-declaration" } */
5
6
7 typedef long v2di __attribute__((vector_size(16)));
8 extern v2di foo1 (int, v2di);
9 extern v2di foo2 (int, int);
10 extern v2di foo3 (int, ...);
11
12 v2di bar1 (int a) { return foo2 (1, a); }
13 v2di bar2 (int a) { return foo3 (1, a); }
14 v2di bar3 (v2di a) { return foo1 (1, a); }
15 v2di bar4 (v2di a) { return foo3 (1, a); }
16
17 int bar5 (int a) { return foo4 (1, a); }
18 int bar6 (v2di a) { return foo4 (1, a); } /* { dg-error "Vector argument passed to unprototyped function" } */