Skip to content

Commit 3a06eda

Browse files
author
Daniel Kroening
committed
don't rely on index expressions to be vector or arrays
1 parent 0e70863 commit 3a06eda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/analyses/goto_rw.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,15 @@ void rw_range_sett::get_objects_index(
253253
sub_size=
254254
to_range_spect(pointer_offset_bits(vector_type.subtype(), ns));
255255
}
256-
else
256+
else if(type.id()==ID_array)
257257
{
258258
const array_typet &array_type=to_array_type(type);
259259

260260
sub_size=
261261
to_range_spect(pointer_offset_bits(array_type.subtype(), ns));
262262
}
263+
else
264+
return;
263265

264266
const exprt simp_index=simplify_expr(expr.index(), ns);
265267

0 commit comments

Comments
 (0)