repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
db/fixup_kernel.sh: update vfs_write() code
[smatch.git]
/
validation
/
sm_switch3.c
blob
0478ef0bd6ed61479a56b68842ee8c820e4f9293
1
#include
"check_debug.h"
2
3
int
a
,
b
;
4
5
int
frob
(
void
);
6
7
int
test
(
int
size
)
8
{
9
a
=
0
;
10
11
if
(({
switch
(
frob
()) {
12
case
1
:
13
a
=
2
;
14
break
;
15
default
:
16
a
=
3
;
17
}
18
b
;}))
19
;
20
__smatch_implied
(
a
);
21
22
a
=
4
;
23
24
if
(({
switch
(
2
) {
25
case
1
:
26
a
=
5
;
27
break
;
28
case
2
:
29
a
=
6
;
30
break
;
31
default
:
32
a
=
7
;
33
}
34
b
;}))
35
;
36
__smatch_implied
(
a
);
37
38
return
0
;
39
}
40
41
/*
42
* check-name: smatch: switch #3
43
* check-command: smatch -I.. sm_switch3.c
44
*
45
* check-output-start
46
sm_switch3.c:20 test() implied: a = '2-3'
47
sm_switch3.c:36 test() implied: a = '6'
48
* check-output-end
49
*/