diff options
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 5fb0623ed580..bebe72e4db91 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4998,15 +4998,13 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, if (TREE_CODE (t) == TARGET_EXPR && TARGET_EXPR_INITIAL (t) == r) return t; - else + else if (TREE_CODE (t) != CONSTRUCTOR) { r = get_target_expr (r); TREE_CONSTANT (r) = true; - return r; } } - else - return r; + return r; } /* Returns true if T is a valid subexpression of a constant expression, |