With following patch testcase passes:

Index: fold-const.c
===================================================================
--- fold-const.c        (Revision 227111)
+++ fold-const.c        (Arbeitskopie)
@@ -2110,6 +2110,17 @@ fold_convert_const (enum tree_code code, tree type
       else if (TREE_CODE (arg1) == REAL_CST)
        return fold_convert_const_fixed_from_real (type, arg1);
     }
+  else if (TREE_CODE (type) == VECTOR_TYPE)
+    {
+      if (TREE_CODE (arg1) == VECTOR_CST
+         && code == NOP_EXPR
+         && TYPE_VECTOR_SUBPARTS (type) == VECTOR_CST_NELTS (arg1))
+       {
+         tree r = copy_node (arg1);
+         TREE_TYPE (arg1) = type;
+         return r;
+       }
+    }
   return NULL_TREE;
 }
Index: cp/constexpr.c
===================================================================
--- constexpr.c (Revision 227111)
+++ constexpr.c (Arbeitskopie)
@@ -1441,8 +1441,6 @@ cxx_eval_call_expression (const constexpr_ctx *ctx
 bool
 reduced_constant_expression_p (tree t)
 {
-  /* Make sure we remove useless initial NOP_EXPRs.  */
-  STRIP_NOPS (t);
   switch (TREE_CODE (t))
     {
     case PTRMEM_CST:

Reply via email to