File tree Expand file tree Collapse file tree 3 files changed +26
-8
lines changed
regression/goto-instrument/goto_rw_pointer_handling-2 Expand file tree Collapse file tree 3 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 1+ int main ()
2+ {
3+ char a = 'a' ;
4+ char * b = & a ;
5+ * b = 'c' ;
6+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --show-dependence-graph
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ ^VERIFICATION SUCCESSFUL$
7+ ^Data dependencies: \d+$
8+ --
9+ ^warning: ignoring
10+ ^Data dependencies: \d+,\s*\d+$
11+ --
12+ This tests that the write-set of a pointer contains only the pointed-to
13+ object when the pointer is dereferenced and written to.
14+
15+ There should therefore be no data dependence between the pointer itself
16+ and the write to the pointed-to object.
Original file line number Diff line number Diff line change @@ -429,18 +429,14 @@ void rw_range_sett::get_objects_typecast(
429429
430430void rw_range_sett::get_objects_address_of (const exprt &object)
431431{
432- if (object. id () == ID_string_constant ||
433- object.id () == ID_label ||
434- object.id () == ID_array ||
435- object.id () == ID_null_object )
432+ if (
433+ object. id () == ID_string_constant || object.id () == ID_label ||
434+ object.id () == ID_array || object. id () == ID_null_object ||
435+ object.id () == ID_symbol )
436436 {
437437 // constant, nothing to do
438438 return ;
439439 }
440- else if (object.id ()==ID_symbol)
441- {
442- get_objects_rec (get_modet::READ, object);
443- }
444440 else if (object.id ()==ID_dereference)
445441 {
446442 get_objects_rec (get_modet::READ, object);
You can’t perform that action at this time.
0 commit comments