convert.c (convert_to_integer, [...]): Include the types in the error message.
authorMarc Glisse <marc.glisse@inria.fr>
Fri, 22 May 2015 20:59:27 +0000 (22:59 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Fri, 22 May 2015 20:59:27 +0000 (20:59 +0000)
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.

From-SVN: r223590

gcc/ChangeLog
gcc/convert.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/simd-1.c

index ceb9444..da46583 100644 (file)
@@ -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.
 
index 142e82a..0aa58ab 100644 (file)
@@ -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);
index 8d480a3..63ebd45 100644 (file)
@@ -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>
index e00e1dd..ff45c9c 100644 (file)
@@ -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;