Skip to content

Commit 1255c15

Browse files
committed
test: add fp-reachability test 3
This test tests whether paths are cut off in case a combination of functions is specified which is not on the same path. As there does not exist a single execution path with both functions b and c, all functions should be removed.
1 parent 6ea7d57 commit 1255c15

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
void a()
2+
{
3+
int e;
4+
}
5+
6+
void b()
7+
{
8+
double f;
9+
if(f == 0)
10+
a();
11+
}
12+
13+
void c()
14+
{
15+
int d;
16+
}
17+
18+
int main()
19+
{
20+
int k;
21+
if(k == 0)
22+
{
23+
int l;
24+
a();
25+
c();
26+
}
27+
else
28+
{
29+
b();
30+
}
31+
int n;
32+
a();
33+
return n;
34+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
main.c
3+
--fp-reachability-slice c
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
dead d;
9+
dead e;
10+
dead f;

0 commit comments

Comments
 (0)