|
14 | 14 | #include <util/arith_tools.h> |
15 | 15 | #include <util/byte_operators.h> |
16 | 16 | #include <util/c_types.h> |
| 17 | +#include <util/config.h> |
17 | 18 | #include <util/expr_iterator.h> |
18 | 19 | #include <util/nodiscard.h> |
19 | 20 | #include <util/pointer_offset_size.h> |
@@ -46,6 +47,7 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns) |
46 | 47 | byte_extract_id(), |
47 | 48 | if_expr.false_case(), |
48 | 49 | from_integer(0, index_type()), |
| 50 | + config.ansi_c.char_width, |
49 | 51 | if_expr.true_case().type()); |
50 | 52 |
|
51 | 53 | if_expr.false_case().swap(be); |
@@ -95,6 +97,7 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns) |
95 | 97 | byte_extract_id(), |
96 | 98 | expr, |
97 | 99 | from_integer(0, index_type()), |
| 100 | + config.ansi_c.char_width, |
98 | 101 | array_typet(char_type(), array_size.value())); |
99 | 102 | } |
100 | 103 |
|
@@ -123,12 +126,12 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns) |
123 | 126 |
|
124 | 127 | array_typet new_array_type(subtype, new_size); |
125 | 128 |
|
126 | | - expr = |
127 | | - byte_extract_exprt( |
128 | | - byte_extract_id(), |
129 | | - expr, |
130 | | - ode.offset(), |
131 | | - new_array_type); |
| 129 | + expr = byte_extract_exprt( |
| 130 | + byte_extract_id(), |
| 131 | + expr, |
| 132 | + ode.offset(), |
| 133 | + config.ansi_c.char_width, |
| 134 | + new_array_type); |
132 | 135 | } |
133 | 136 | } |
134 | 137 | } |
|
0 commit comments