From: Marc Glisse Date: Fri, 22 May 2015 20:59:27 +0000 (+0200) Subject: convert.c (convert_to_integer, [...]): Include the types in the error message. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8f75b8cde8c632738e447f5493aea7b30be8e32;p=gcc.git convert.c (convert_to_integer, [...]): Include the types in the error message. 2015-05-22 Marc Glisse gcc/ * convert.c (convert_to_integer, convert_to_vector): Include the types in the error message. gcc/testsuite/ * gcc.dg/simd-1.c: Update to the new message. From-SVN: r223590 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ceb9444765f..da465838256 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-05-22 Marc Glisse + + * convert.c (convert_to_integer, convert_to_vector): Include the + types in the error message. + 2015-05-22 Marc Glisse * match.pd ((x | y) & ~x -> y & ~x, (x & y) | ~x -> y | ~x): New diff --git a/gcc/convert.c b/gcc/convert.c index 142e82a3c8f..0aa58ab0547 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -920,7 +920,9 @@ convert_to_integer (tree type, tree expr) case VECTOR_TYPE: if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr)))) { - error ("can%'t convert between vector values of different size"); + error ("can%'t convert a vector of type %qT" + " to type %qT which has different size", + TREE_TYPE (expr), type); return error_mark_node; } return build1 (VIEW_CONVERT_EXPR, type, expr); @@ -1004,7 +1006,9 @@ convert_to_vector (tree type, tree expr) case VECTOR_TYPE: if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr)))) { - error ("can%'t convert between vector values of different size"); + error ("can%'t convert a value of type %qT" + " to vector type %qT which has different size", + TREE_TYPE (expr), type); return error_mark_node; } return build1 (VIEW_CONVERT_EXPR, type, expr); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8d480a3a21f..63ebd45dc98 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-05-22 Marc Glisse + + * gcc.dg/simd-1.c: Update to the new message. + 2015-05-22 Marc Glisse * gcc.dg/nand.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/simd-1.c b/gcc/testsuite/gcc.dg/simd-1.c index e00e1dd6931..ff45c9c567e 100644 --- a/gcc/testsuite/gcc.dg/simd-1.c +++ b/gcc/testsuite/gcc.dg/simd-1.c @@ -45,7 +45,7 @@ hanneke () foo = (typeof (foo)) foo2; /* Casted assignment between scalar and SIMD of different size. */ - foo1 = (typeof (foo1)) foo2; /* { dg-error "can't convert between vector values of different size" } */ + foo1 = (typeof (foo1)) foo2; /* { dg-error "can't convert a vector of type" } */ /* Operators on compatible SIMD types. */ a += b + b;