simd1.C revision 1.1.1.1
1/* { dg-do compile } */
2
3/* Test overload resolution of vector types.
4   From Janis Johnson and Paolo Bonzini, based on PR/16882 */
5
6#define vector __attribute__((vector_size(16)))
7
8vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-error "near match" } */
9/* { dg-warning "vector returned by ref" "" { target { powerpc*-*-linux* && ilp32 } }  8 } */
10vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-error "near match" } */
11
12extern int i;
13extern vector signed short vss;
14extern vector signed char *vscp;
15extern vector signed short *vssp;
16extern const vector signed short *cvssp;
17
18void foo ()
19{
20  vss = vld(i, vscp);        /* { dg-error "no match" } */
21  vss = vld(i, vssp);
22  vss = vld(i, cvssp);
23}
24