From: jason Date: Tue, 28 Oct 2014 19:37:46 +0000 (+0000) Subject: * constexpr.c (cxx_eval_outermost_constant_expr): Tweak. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a281cd7aba892b583c9bf3c6b0f509644aaabcc;p=thirdparty%2Fgcc.git * constexpr.c (cxx_eval_outermost_constant_expr): Tweak. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216809 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1a2e884a84bc..e1ec24c485aa 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 cd10766aebd8..225a9924e903 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