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 ab280adb6477380e7f4e241cf412c47bc8353a95..4946ec4f9b3defac8f282879a3dcd262a427bf70 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 ceefbf2490670091d53fadcfee3169ec9dfb513a..36bae1c7793c40e9d47081a5bc6772d3124e32c9 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 d899403219e6da8def3de78ff016a94f66a2a9bb..5257ba5e068e8851a0c61151ce797db9604341fe 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" } */