Skip to content

Commit 9b8df36

Browse files
author
Daniel Kroening
authored
Merge pull request #155 from peterschrammel/loop-number-update
goto_functions update must recompute loop numbers
2 parents 896d523 + 750e904 commit 9b8df36

File tree

7 files changed

+43
-0
lines changed

7 files changed

+43
-0
lines changed
581 Bytes
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import java.util.List;
2+
3+
public class iterator1
4+
{
5+
public void f(List<String> list)
6+
{
7+
int i = 0;
8+
for(String s : list)
9+
i++;
10+
}
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
iterator1.class
3+
--cover location --unwind 3 --function iterator1.f
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^.*SATISFIED$
7+
--
8+
^warning: ignoring
681 Bytes
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import java.util.List;
2+
3+
public class iterator2
4+
{
5+
public void f(List<List<String>> list)
6+
{
7+
int i = 0, j = 0;
8+
for(List<String> l : list)
9+
{
10+
for(String s : l)
11+
i++;
12+
}
13+
for(j=0;j<i;j++);
14+
}
15+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
iterator2.class
3+
--cover location --unwind 3 --function iterator2.f
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^.*SATISFIED$
7+
--
8+
^warning: ignoring

src/goto-programs/goto_functions_template.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class goto_functions_templatet
117117
compute_incoming_edges();
118118
compute_target_numbers();
119119
compute_location_numbers();
120+
compute_loop_numbers();
120121
}
121122

122123
static inline irep_idt entry_point()

0 commit comments

Comments
 (0)