From: James E Wilson Date: Sat, 11 Sep 2004 03:29:07 +0000 (+0000) Subject: Fix excess errors problem for invalid vector testcase. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=273d67e73b87d063b8f10ba5a562d151a3a480dd;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab280adb647..4946ec4f9b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -10,6 +10,9 @@ 2004-09-10 James E Wilson + * 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. diff --git a/gcc/convert.c b/gcc/convert.c index ceefbf24906..36bae1c7793 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -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; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d899403219e..5257ba5e068 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-09-10 James E Wilson + + * gcc.dg/convert-vec-1.c: New test. + 2004-09-10 Roger Sayle 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 index 00000000000..49872984073 --- /dev/null +++ b/gcc/testsuite/gcc.dg/convert-vec-1.c @@ -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" } */