Skip to content

Commit 3a2432a

Browse files
committed
Initialize uninit boolean
gcc/rust/ChangeLog: * backend/rust-constexpr.cc (eval_binary_expression): Set initial value equality value to false. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
1 parent 9d66f0e commit 3a2432a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/backend/rust-constexpr.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@ eval_binary_expression (const constexpr_ctx *ctx, tree t, bool lval,
31373137
{
31383138
tree lmem = PTRMEM_CST_MEMBER (lhs);
31393139
tree rmem = PTRMEM_CST_MEMBER (rhs);
3140-
bool eq;
3140+
bool eq = false;
31413141
if (TREE_CODE (lmem) == TREE_CODE (rmem)
31423142
&& TREE_CODE (lmem) == FIELD_DECL
31433143
&& TREE_CODE (DECL_CONTEXT (lmem)) == UNION_TYPE

0 commit comments

Comments
 (0)