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
implied_value: don't get confused by casts
[smatch.git]
/
validation
/
bug_inline_switch.c
blob
957882405a9036c04ef6154d4668b0b01eb1640a
1
2
#define __u16 unsigned short
3
int
foo
(
__u16 n
);
4
static
inline
__u16
f
(
__u16 val
)
5
{
6
return
val
;
7
}
8
9
static
inline
unsigned int
bar
(
__u16 n
)
10
{
11
switch
(
n
) {
12
case
(
1
?
1
:
f
(
1
)):
13
return
4
;
14
}
15
}
16
17
int
foo
(
__u16 n
)
18
{
19
bar
(
n
);
20
bar
(
n
);
21
return
0
;
22
}
23
/*
24
* check-name: inlining switch statement
25
*/