From a7e7d838ef3cbdb97cd55cad8b40ed86f32134ad 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 or floatbv type This is a fix-up for 525c23dc7ce: we must not remove typecasts towards pointers (or floatbv) when the operand is extractbits as our back-ends do not support extractbits with pointer type and casts towards floatbv are non-trivial. --- src/util/simplify_expr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/simplify_expr.cpp b/src/util/simplify_expr.cpp index 18b2cf3fa8c..c21b0d28250 100644 --- a/src/util/simplify_expr.cpp +++ b/src/util/simplify_expr.cpp @@ -1342,6 +1342,7 @@ simplify_exprt::simplify_typecast(const typecast_exprt &expr) else if(auto extractbits = expr_try_dynamic_cast(operand)) { if( + expr_type_id != ID_floatbv && expr_type_id != ID_pointer && can_cast_type(expr_type) && can_cast_type(operand.type()) && to_bitvector_type(expr_type).get_width() ==