From ed9cd5911418a426df1a5a20018e841bd81f8b6e Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 9 Jul 2025 20:48:58 +0000 Subject: [PATCH] Simplifier: do not create extractbits with pointer type This is a fix-up for 525c23dc7ce: we must not remove typecasts towards pointers when the operand is extractbits as our back-ends do not support extractbits with pointer type. --- src/util/simplify_expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/simplify_expr.cpp b/src/util/simplify_expr.cpp index 18b2cf3fa8c..2c3595b5e65 100644 --- a/src/util/simplify_expr.cpp +++ b/src/util/simplify_expr.cpp @@ -1342,7 +1342,7 @@ simplify_exprt::simplify_typecast(const typecast_exprt &expr) else if(auto extractbits = expr_try_dynamic_cast(operand)) { if( - can_cast_type(expr_type) && + can_cast_type(expr_type) && expr_type_id != ID_pointer && can_cast_type(operand.type()) && to_bitvector_type(expr_type).get_width() == to_bitvector_type(operand.type()).get_width())