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
function_hooks/unwind: introduce return_implies_exact()
[smatch.git]
/
validation
/
sm_range1.c
blob
39a8f8e7b3b4d7920662e81c7945e134415ada4b
1
struct
ture
{
2
int
x
;
3
};
4
5
struct
ture
*
p
;
6
struct
ture
*
q
;
7
int
xxx
;
8
9
int
func
(
void
)
10
{
11
12
for
(
xxx
=
0
;
xxx
<
10
;
xxx
++) {
13
if
(
p
&&
q
)
14
break
;
15
}
16
// this needs two pass processing to work.
17
// if (xxx == 5)
18
// q->x = 1;
19
if
(
xxx
==
10
)
20
return
;
21
p
->
x
=
1
;
22
23
return
0
;
24
}
25
26
/*
27
* check-name: Implied Ranges #1
28
* check-command: smatch sm_range1.c
29
*/