From c37b7b3bf4d347f67636cc8978e38fbc49e09173 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 4 Jun 2025 10:32:03 +0200 Subject: [PATCH] simplify: fix single_bit_vector memory leak --- frontends/ast/simplify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 749767743..ef5e49519 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -2087,7 +2087,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin std::swap(range_left, range_right); range_swapped = force_upto; } - if (range_left == range_right) + if (range_left == range_right && !attributes.count(ID::single_bit_vector)) set_attribute(ID::single_bit_vector, mkconst_int(1, false)); } } else {