aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/spu/intrinsics-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/spu/intrinsics-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/spu/intrinsics-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/spu/intrinsics-1.c b/gcc-4.9/gcc/testsuite/gcc.target/spu/intrinsics-1.c
new file mode 100644
index 000000000..2720889f0
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/spu/intrinsics-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+#include <spu_intrinsics.h>
+/* With this intrinsics section, we used to ICE as we would try
+ to convert from an vector to an integer type. */
+void f(void)
+{
+ vec_uint4 gt, N;
+ vec_int4 a;
+ int *a1;
+ _Complex double b;
+ gt = spu_cmpgt(a, N); /* { dg-error "parameter list" } */
+ gt = spu_cmpgt(a, a1); /* { dg-error "integer from pointer without a cast" } */
+ gt = spu_cmpgt(a, b); /* { dg-error "parameter list" } */
+ gt = spu_cmpgt(a, a);
+ a = spu_cmpgt(a, a); /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */
+/* { dg-message "note: expected 'int'" "" { target *-*-* } 13 } */
+/* { dg-error "incompatible types when assigning" "" { target *-*-* } 16 } */
+}