summaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
authorglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-22 20:59:27 +0000
committerglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-22 20:59:27 +0000
commitcc77228cbb0c4d81ab5ba569d8593e696cb0f520 (patch)
tree533b0e2158b43a148062294f49fc870a85453066 /gcc/convert.c
parent19ecc7c1742ebd58f7b940da6cee3c6891020f1e (diff)
downloadgcc-cc77228cbb0c4d81ab5ba569d8593e696cb0f520.tar.gz
2015-05-22 Marc Glisse <marc.glisse@inria.fr>
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223590 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c8
1 files changed, 6 insertions, 2 deletions
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);