2016-04-06 Nathan Sidwell PR c++/70501 * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE similarly to PMF. * g++.dg/init/pr70501.C: New. Index: cp/constexpr.c =================================================================== --- cp/constexpr.c (revision 234768) +++ cp/constexpr.c (working copy) @@ -2370,10 +2370,10 @@ cxx_eval_bare_aggregate (const constexpr tree type = TREE_TYPE (t); constexpr_ctx new_ctx; - if (TYPE_PTRMEMFUNC_P (type)) + if (TYPE_PTRMEMFUNC_P (type) || VECTOR_TYPE_P (type)) { - /* We don't really need the ctx->ctor business for a PMF, but it's - simpler to use the same code. */ + /* We don't really need the ctx->ctor business for a PMF or + vector, but it's simpler to use the same code. */ new_ctx = *ctx; new_ctx.ctor = build_constructor (type, NULL); new_ctx.object = NULL_TREE; Index: testsuite/g++.dg/init/pr70501.C =================================================================== --- testsuite/g++.dg/init/pr70501.C (nonexistent) +++ testsuite/g++.dg/init/pr70501.C (working copy) @@ -0,0 +1,11 @@ +/* { dg-options "" } Not pedantic */ + +typedef int v4si __attribute__ ((vector_size (16))); + +struct S { v4si v; }; + +void +fn2 (int i, int j) +{ + struct S s = { .v = i <= j + (v4si){(1, 2)} }; +}