Fix excess errors problem for invalid vector testcase.

* convert.c (convert_to_vector): Replace recursive call with
error_mark_node.
* gcc.dg/convert-vec-1.c: New test.

From-SVN: r87340
This commit is contained in:
James E Wilson 2004-09-11 03:29:07 +00:00 committed by Jim Wilson
parent 3ae472c234
commit 273d67e73b
4 changed files with 11 additions and 1 deletions

View 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.

View 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;
}
}

View 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

View File

@ -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" } */