aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/convert.c8
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/simd-1.c2
4 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ceb9444..da46583 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2015-05-22 Marc Glisse <marc.glisse@inria.fr>
+ * convert.c (convert_to_integer, convert_to_vector): Include the
+ types in the error message.
+
+2015-05-22 Marc Glisse <marc.glisse@inria.fr>
+
* match.pd ((x | y) & ~x -> y & ~x, (x & y) | ~x -> y | ~x): New
simplifications.
diff --git a/gcc/convert.c b/gcc/convert.c
index 142e82a..0aa58ab 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 8d480a3..63ebd45 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2015-05-22 Marc Glisse <marc.glisse@inria.fr>
+ * gcc.dg/simd-1.c: Update to the new message.
+
+2015-05-22 Marc Glisse <marc.glisse@inria.fr>
+
* gcc.dg/nand.c: New testcase.
2015-05-22 Sandra Loosemore <sandra@codesourcery.com>
diff --git a/gcc/testsuite/gcc.dg/simd-1.c b/gcc/testsuite/gcc.dg/simd-1.c
index e00e1dd..ff45c9c 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;