2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / spu / intrinsics-1.c
blobb8974f608c81af05a8cac3ba36c2db78cbb1ef5d
1 /* { dg-do compile } */
2 /* { dg-options "-std=c99 -pedantic-errors" } */
3 #include <spu_intrinsics.h>
4 /* With this intrinsics section, we used to ICE as we would try
5 to convert from an vector to an integer type. */
6 void f(void)
8 vec_uint4 gt, N;
9 vec_int4 a;
10 int *a1;
11 _Complex double b;
12 gt = spu_cmpgt(a, N); /* { dg-error "parameter list" } */
14 gt = spu_cmpgt(a, a1); /* { dg-error "integer from pointer without a cast" } */
15 /* { dg-message "note: expected 'int'" "" { target *-*-* } .-1 } */
17 gt = spu_cmpgt(a, b); /* { dg-error "parameter list" } */
19 gt = spu_cmpgt(a, a);
21 a = spu_cmpgt(a, a);
22 /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" "" { target *-*-* } .-1 } */
23 /* { dg-error "incompatible types when assigning" "" { target *-*-* } .-2 } */