From: Jason Merrill Date: Tue, 28 Oct 2014 19:37:46 +0000 (-0400) Subject: * constexpr.c (cxx_eval_outermost_constant_expr): Tweak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69e09400911e0ced6a71873754ce736135458b4d;p=gcc.git * constexpr.c (cxx_eval_outermost_constant_expr): Tweak. From-SVN: r216809 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1a2e884a84b..e1ec24c485a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2014-10-28 Jason Merrill + + * constexpr.c (cxx_eval_outermost_constant_expr): Tweak. + 2014-10-28 Andrew MacLeod * call.c: Adjust include files. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index cd10766aebd..225a9924e90 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -2756,8 +2756,6 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, hash_map map; ctx.values = ↦ tree type = initialized_type (t); - if (!object && TREE_CODE (t) == TARGET_EXPR) - object = TARGET_EXPR_SLOT (t); tree r = t; if (AGGREGATE_TYPE_P (type) || VECTOR_TYPE_P (type)) { @@ -2770,6 +2768,8 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, initialized. */ ctx.ctor = build_constructor (type, NULL); CONSTRUCTOR_NO_IMPLICIT_ZERO (ctx.ctor) = true; + if (!object && TREE_CODE (t) == TARGET_EXPR) + object = TARGET_EXPR_SLOT (t); ctx.object = object; if (object) gcc_assert (same_type_ignoring_top_level_qualifiers_p