@@ -205,6 +205,8 @@ void rw_range_sett::get_objects_dereference(
205
205
{
206
206
const exprt &pointer=deref.pointer ();
207
207
get_objects_rec (READ, pointer);
208
+ if (mode!=READ)
209
+ get_objects_rec (mode, pointer);
208
210
}
209
211
210
212
/* ******************************************************************\
@@ -583,13 +585,14 @@ Function: rw_range_sett::get_objects_address_of
583
585
584
586
void rw_range_sett::get_objects_address_of (const exprt &object)
585
587
{
586
- if (object.id ()==ID_symbol ||
587
- object.id ()==ID_string_constant ||
588
+ if (object.id ()==ID_string_constant ||
588
589
object.id ()==ID_label ||
589
590
object.id ()==ID_array ||
590
591
object.id ()==" NULL-object" )
591
592
// constant, nothing to do
592
593
return ;
594
+ else if (object.id ()==ID_symbol)
595
+ get_objects_rec (READ, object);
593
596
else if (object.id ()==ID_dereference)
594
597
get_objects_rec (READ, object);
595
598
else if (object.id ()==ID_index)
@@ -752,6 +755,11 @@ void rw_range_sett::get_objects_rec(
752
755
{
753
756
// dereferencing may yield some weird ones, ignore these
754
757
}
758
+ else if (mode==LHS_W)
759
+ {
760
+ forall_operands (it, expr)
761
+ get_objects_rec (mode, *it);
762
+ }
755
763
else
756
764
throw " rw_range_sett: assignment to `" +expr.id_string ()+" ' not handled" ;
757
765
}
0 commit comments