Check parameter type of spu intrinsics spu_convts, spu_convtu, spu_convtf
authorsaliu <saliu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Feb 2008 12:46:33 +0000 (12:46 +0000)
committersaliu <saliu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Feb 2008 12:46:33 +0000 (12:46 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132184 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gcc.target/spu/intrinsics-3.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.target/spu/intrinsics-3.c b/gcc/testsuite/gcc.target/spu/intrinsics-3.c
new file mode 100644 (file)
index 0000000..d468b23
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+#include <spu_intrinsics.h>
+void f0 (vec_uint4 *in)
+{
+  vec_float4 out = spu_convtf (in[0], 128); /* { dg-error "expects an integer literal in the range" "0, 127"  }*/
+}
+
+void f1 (vec_int4 *in)
+{
+  vec_float4 out = spu_convtf (in[0], 128); /* { dg-error "expects an integer literal in the range" "0, 127"  }*/
+}
+
+void f2 (vec_float4 *in)
+{
+  vec_int4 out = spu_convts (in[0], 128); /* { dg-error "expects an integer literal in the range" "0, 127"  }*/
+}
+
+void f3 (vec_float4 *in)
+{
+  vec_uint4 out = spu_convtu (in[0], 128); /* { dg-error "expects an integer literal in the range" "0, 127"  }*/
+}