aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-01-15 15:46:09 -0500
committerJason Merrill <jason@gcc.gnu.org>2015-01-15 15:46:09 -0500
commit134efa824828834466593e60f7786669da3adb39 (patch)
treea2d333ebdde851d78a6650edbf382c05ca8b92a6 /gcc
parentc3c29ba5882f0f7db60ac2efca272a79cefa81c8 (diff)
downloadgcc-134efa824828834466593e60f7786669da3adb39.zip
gcc-134efa824828834466593e60f7786669da3adb39.tar.gz
gcc-134efa824828834466593e60f7786669da3adb39.tar.bz2
re PR c++/64356 (Some constexpr expressions not recognized as constexpr)
PR c++/64356 * constexpr.c (cxx_eval_binary_expression): Fix pasto. From-SVN: r219687
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/constexpr.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7ad7737..2e74c0a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2015-01-15 Jason Merrill <jason@redhat.com>
+ PR c++/64356
+ * constexpr.c (cxx_eval_binary_expression): Fix pasto.
+
PR c++/63283
* constexpr.c (potential_constant_expression_1): Handle reference
args in templates.
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index e27a892..943ecbf 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -1624,7 +1624,7 @@ cxx_eval_binary_expression (const constexpr_ctx *ctx, tree t,
rhs = cxx_eval_constant_expression (ctx, orig_rhs, /*lval*/false,
non_constant_p, overflow_p);
if (!ptr)
- VERIFY_CONSTANT (lhs);
+ VERIFY_CONSTANT (rhs);
location_t loc = EXPR_LOCATION (t);
enum tree_code code = TREE_CODE (t);
@@ -1640,7 +1640,7 @@ cxx_eval_binary_expression (const constexpr_ctx *ctx, tree t,
else if (cxx_eval_check_shift_p (loc, ctx, code, type, lhs, rhs))
*non_constant_p = true;
if (!ptr)
- VERIFY_CONSTANT (lhs);
+ VERIFY_CONSTANT (r);
return r;
}