File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
regression/goto-analyzer/dependence-graph14 Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ int main ()
2+ {
3+ int a [10 ];
4+ a [2 ] = 2 ;
5+ a [1 ] = 1 ;
6+ int out = a [2 ];
7+ return out ;
8+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --dependence-graph --show
4+ activate-multi-line-match
5+ ^EXIT=0$
6+ ^SIGNAL=0$
7+ \/\/ ([0-9]+).*\n.*a\[\(signed long( long)? int\)2\] = 2;(.*\n)*Data dependencies: (\1)\n(.*\n){2,3}.*out = *
8+ --
9+ \/\/ ([0-9]+).*\n.*a\[\(signed long( long)? int\)1\] = 1;(.*\n)*Data dependencies: (\1)\n(.*\n){2,3}.*out = *
10+ ^warning: ignoring
11+ --
12+
13+ The two regex above matches output portions like shown below (with <N> being a
14+ location number). The intention is to make sure the rw_set recognize the range
15+ of the assignment to an array index correctly.
16+
17+ // <N> file main.c line 4 function main
18+ a[(signed long int)2] = 2;
19+ ...
20+
21+ **** 4 file main.c line 6 function main
22+ Data dependencies: <N>
23+
24+ // 4 file main.c line 6 function main
25+ out = a[(signed long int)2];
26+
Original file line number Diff line number Diff line change @@ -542,7 +542,7 @@ void rw_range_sett::get_objects_rec(
542542 {
543543 range_spect range_end=size==-1 ? -1 : range_start+size;
544544 if (size!=-1 && full_size!=-1 )
545- range_end=std::max (range_end, full_size);
545+ range_end=std::min (range_end, full_size);
546546
547547 add (mode, identifier, range_start, range_end);
548548 }
You can’t perform that action at this time.
0 commit comments