* constexpr.c (cxx_eval_outermost_constant_expr): Tweak.

From-SVN: r216809
This commit is contained in:
Jason Merrill 2014-10-28 15:37:46 -04:00 committed by Jason Merrill
parent 3a21b777bb
commit 69e0940091
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2014-10-28 Jason Merrill <jason@redhat.com>
* constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
2014-10-28 Andrew MacLeod <amacleod@redhat.com>
* call.c: Adjust include files.

View File

@ -2756,8 +2756,6 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant,
hash_map<tree,tree> map;
ctx.values = &map;
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