cp/
* constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
similarly to PMF.
testsuite/
* g++.dg/init/pr70501.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234904
138bc75d-0d04-0410-961f-
82ee72b054a4
+2016-04-12 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/70501
+ * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
+ similarly to PMF.
+
2016-04-11 Jason Merrill <jason@redhat.com>
* mangle.c (decl_is_template_id): The template itself counts as a
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;
+2016-04-12 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/70501
+ * g++.dg/init/pr70501.C: New.
+
2016-04-12 David Wohlferd <dw@LimeGreenSocks.com>
* gcc.target/i386/asm-flag-6.c: New test.
--- /dev/null
+/* { 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)} };
+}