Reverting merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / conversion / simd1.C
blobfa40b0eaad289637ce9ffd6188ba728e7f772692
1 /* { dg-do compile } */
3 /* Test overload resolution of vector types.
4    From Janis Johnson and Paolo Bonzini, based on PR/16882 */
6 #define vector __attribute__((vector_size(16)))
8 vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */
9 vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */
11 extern int i;
12 extern vector signed short vss;
13 extern vector signed char *vscp;
14 extern vector signed short *vssp;
15 extern const vector signed short *cvssp;
17 void foo ()
19   vss = vld(i, vscp);        /* { dg-error "no matching function for call" } */
20   // { dg-message "candidate" "candidate note" { target *-*-* } 19 }
21   vss = vld(i, vssp);
22   vss = vld(i, cvssp);
25 /* Ignore a warning that is irrelevant to the purpose of this test.  */
26 /* { dg-prune-output ".*GCC vector returned by reference.*" } */