From: Pierre-Emmanuel Patry <[email protected]>

gcc/rust/ChangeLog:

        * backend/rust-constexpr.cc (eval_binary_expression): Set initial value
        equality value to false.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/3a2432a8bf6b32bff7096f653ddc2629ccfec2ca

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4312

 gcc/rust/backend/rust-constexpr.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/backend/rust-constexpr.cc 
b/gcc/rust/backend/rust-constexpr.cc
index d04f86433..e32ba3abd 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -3137,7 +3137,7 @@ eval_binary_expression (const constexpr_ctx *ctx, tree t, 
bool lval,
        {
          tree lmem = PTRMEM_CST_MEMBER (lhs);
          tree rmem = PTRMEM_CST_MEMBER (rhs);
-         bool eq;
+         bool eq = false;
          if (TREE_CODE (lmem) == TREE_CODE (rmem)
              && TREE_CODE (lmem) == FIELD_DECL
              && TREE_CODE (DECL_CONTEXT (lmem)) == UNION_TYPE

base-commit: 9d66f0e0b82f7335c4600cbda62945f75747fc85
-- 
2.51.2

Reply via email to