Fix excess errors problem for invalid vector testcase.
authorJames E Wilson <wilson@specifixinc.com>
Sat, 11 Sep 2004 03:29:07 +0000 (03:29 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Sat, 11 Sep 2004 03:29:07 +0000 (20:29 -0700)
* convert.c (convert_to_vector): Replace recursive call with
error_mark_node.
* gcc.dg/convert-vec-1.c: New test.

From-SVN: r87340

gcc/ChangeLog
gcc/convert.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/convert-vec-1.c [new file with mode: 0644]

index ab280ad..4946ec4 100644 (file)
@@ -10,6 +10,9 @@
 
 2004-09-10  James E Wilson  <wilson@specifixinc.com>
 
+       * convert.c (convert_to_vector): Replace recursive call with
+       error_mark_node.
+
        * emit-rtl.c (gen_const_vector): Renamed from gen_const_vector_0.
        Add integer argument named constant.  Use const_tiny_rtx instead of
        CONST0_RTX.
index ceefbf2..36bae1c 100644 (file)
@@ -761,6 +761,6 @@ convert_to_vector (tree type, tree expr)
 
     default:
       error ("can't convert value to a vector");
-      return convert_to_vector (type, integer_zero_node);
+      return error_mark_node;
     }
 }
index d899403..5257ba5 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-10  James E Wilson  <wilson@specifixinc.com>
+
+       * gcc.dg/convert-vec-1.c: New test.
+
 2004-09-10  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/17024
diff --git a/gcc/testsuite/gcc.dg/convert-vec-1.c b/gcc/testsuite/gcc.dg/convert-vec-1.c
new file mode 100644 (file)
index 0000000..4987298
--- /dev/null
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+typedef float v2sf __attribute__ ((vector_size (8)));
+v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "can't convert" } */