1 /* { dg-do compile } */
2 /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
3 
4 /* Test overload resolution of vector types.
5    From Janis Johnson and Paolo Bonzini, based on PR/16882 */
6 
7 #define vector __attribute__((vector_size(16)))
8 
vld(int a1,const vector signed int * a2)9 vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */
vld(int a1,const vector signed short * a2)10 vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */
11 
12 extern int i;
13 extern vector signed short vss;
14 extern vector signed char *vscp;
15 extern vector signed short *vssp;
16 extern const vector signed short *cvssp;
17 
foo()18 void foo ()
19 {
20   vss = vld(i, vscp);        /* { dg-error "no matching function for call" } */
21   vss = vld(i, vssp);
22   vss = vld(i, cvssp);
23 }
24 
25 /* Ignore a warning that is irrelevant to the purpose of this test.  */
26 /* { dg-prune-output ".*GCC vector returned by reference.*" } */
27