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



--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-03 
13:06:14 UTC ---

--- semantics.c.jj1    2012-11-23 00:14:40.000000000 +0100

+++ semantics.c    2012-12-03 14:02:54.407690163 +0100

@@ -6451,6 +6451,14 @@ adjust_temp_type (tree type, tree temp)

   /* Avoid wrapping an aggregate value in a NOP_EXPR.  */

   if (TREE_CODE (temp) == CONSTRUCTOR)

     return build_constructor (type, CONSTRUCTOR_ELTS (temp));

+  if (TREE_CODE (temp) == VECTOR_CST)

+    {

+      int i, count = TYPE_VECTOR_SUBPARTS (type);

+      tree *vec = XALLOCAVEC (tree, count);

+      for (i = 0; i < count; i++)

+    vec[i] = cp_fold_convert (TREE_TYPE (type), VECTOR_CST_ELT (temp, i));

+      return build_vector (type, vec);

+    }

   gcc_assert (SCALAR_TYPE_P (type));

   return cp_fold_convert (type, temp);

 }



fixes this, type_traits doesn't seem to be needed in the testcase fortunately.

Reply via email to