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
check_deref: use add_dereference_hook()
[smatch.git]
/
validation
/
memops
/
type-punning-flt2int.c
blob
fadaf6876d13356a28a44ded30135b038a2a319f
1
union
u
{
2
int
i
;
3
float
f
;
4
};
5
6
static int
foo
(
void
)
7
{
8
union
u u
= { .
f
=
0.123
};
9
return
u
.
i
;
10
}
11
12
/*
13
* check-name: type-punning-float-to-int
14
* check description: must not infer the int value from the float
15
* check-command: test-linearize $file
16
*
17
* check-output-ignore
18
* check-output-contains: load\\.
19
*/