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
fix: kill unreachable BBs after killing a child
[smatch.git]
/
validation
/
crazy02-not-so.c
blob
fe71335875ee37488a855101069c6f3ca0a1ef7b
1
int
foo
(
int
*
ptr
,
int
i
)
2
{
3
int
*
p
;
4
5
switch
(
i
-
i
) {
// will be optimized to 0
6
case
0
:
7
return
0
;
8
case
1
:
// will be optimized away
9
p
=
ptr
;
10
do
{
// will be an unreachable loop
11
*
p
++ =
123
;
12
}
while
(--
i
);
13
break
;
14
}
15
16
return
1
;
17
}
18
19
/*
20
* check-name: crazy02-not-so.c
21
* check-command: sparse -Wno-decl $file
22
*/