diff options
author | Jason Merrill <jason@redhat.com> | 2014-10-28 15:37:46 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-10-28 15:37:46 -0400 |
commit | 69e09400911e0ced6a71873754ce736135458b4d (patch) | |
tree | 4ab1f30cc051265bc25f933df07f4c1a2fe76b98 /gcc | |
parent | 3a21b777bbaa8246e8cb138ffc28cf30b08d9950 (diff) | |
download | gcc-69e09400911e0ced6a71873754ce736135458b4d.zip gcc-69e09400911e0ced6a71873754ce736135458b4d.tar.gz gcc-69e09400911e0ced6a71873754ce736135458b4d.tar.bz2 |
* constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
From-SVN: r216809
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/constexpr.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1a2e884..e1ec24c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index cd10766..225a992 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<tree,tree> 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 |