From: Pierre-Emmanuel Patry <[email protected]>
Fixes #122886
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]>
---
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 d04f8643306..e32ba3abd4f 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
--
2.50.1