http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48098

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-14 
09:59:32 UTC ---
Just swapping the order of arguments to useless_type_conversion_p works too.
If we consider build_vector_from_val as conversion from sc's type to the inner
type of the vector, then vectype's inner type as outer_type needs to go first:

--- gcc/tree.c.jj    2011-03-11 12:16:39.000000000 +0100
+++ gcc/tree.c    2011-03-14 10:57:21.000000000 +0100
@@ -1376,8 +1376,8 @@ build_vector_from_val (tree vectype, tre
   if (sc == error_mark_node)
     return sc;

-  gcc_assert (useless_type_conversion_p (TREE_TYPE (sc),
-                     TREE_TYPE (vectype)));
+  gcc_assert (useless_type_conversion_p (TREE_TYPE (vectype),
+                     TREE_TYPE (sc)));

   v = VEC_alloc (constructor_elt, gc, nunits);
   for (i = 0; i < nunits; ++i)

Reply via email to