Commit d4619dc1 by Nathan Sidwell Committed by Nathan Sidwell

re PR c++/70501 (internal compiler error: in verify_ctor_sanity, at cp/constexpr.c:2249)

	PR c++/70501

	cp/
	* constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
	similarly to PMF.

	testsuite/
	* g++.dg/init/pr70501.C: New.

From-SVN: r234904
parent 4f93efa4
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> 2016-04-11 Jason Merrill <jason@redhat.com>
* mangle.c (decl_is_template_id): The template itself counts as a * mangle.c (decl_is_template_id): The template itself counts as a
......
...@@ -2394,10 +2394,10 @@ cxx_eval_bare_aggregate (const constexpr_ctx *ctx, tree t, ...@@ -2394,10 +2394,10 @@ cxx_eval_bare_aggregate (const constexpr_ctx *ctx, tree t,
tree type = TREE_TYPE (t); tree type = TREE_TYPE (t);
constexpr_ctx new_ctx; 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 /* We don't really need the ctx->ctor business for a PMF or
simpler to use the same code. */ vector, but it's simpler to use the same code. */
new_ctx = *ctx; new_ctx = *ctx;
new_ctx.ctor = build_constructor (type, NULL); new_ctx.ctor = build_constructor (type, NULL);
new_ctx.object = NULL_TREE; 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> 2016-04-12 David Wohlferd <dw@LimeGreenSocks.com>
* gcc.target/i386/asm-flag-6.c: New test. * gcc.target/i386/asm-flag-6.c: New test.
......
/* { 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)} };
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment