===================================================================
@@ -5400,21 +5400,21 @@ reshape_init_r (tree type, reshape_iter
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
}
d->cur++;
return init;
}
/* "If T is a class type and the initializer list has a single element of
type cv U, where U is T or a class derived from T, the object is
initialized from that element." Even if T is an aggregate. */
- if (cxx_dialect >= cxx11 && CLASS_TYPE_P (type)
+ if (cxx_dialect >= cxx11 && (CLASS_TYPE_P (type) || VECTOR_TYPE_P (type))
&& first_initializer_p
&& d->end - d->cur == 1
&& reference_related_p (type, TREE_TYPE (init)))
{
d->cur++;
return init;
}
/* [dcl.init.aggr]
===================================================================
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++11 } }
+
+typedef float X __attribute__ ((vector_size (4 * sizeof (float))));
+
+X x;
+X x2{x};