Consider properties of inline functions
Properties in inline functions used to be ignored because we ran partial_inline to inline them. Since we are not doing that anymore, properties in inline functions have been ignored without this fix. Inline functions are handled as any other functions now
This commit is contained in:
parent
95e15fdbc2
commit
ffd6d3823e
|
@ -0,0 +1,10 @@
|
||||||
|
static inline short inc(short x)
|
||||||
|
{
|
||||||
|
return x + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
short z;
|
||||||
|
inc(z);
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
CORE
|
||||||
|
main.c
|
||||||
|
--property inc.overflow.1 --property inc.overflow.2 --slice-formula --signed-overflow-check --conversion-check
|
||||||
|
^EXIT=10$
|
||||||
|
^SIGNAL=0$
|
||||||
|
VERIFICATION FAILED
|
||||||
|
\[inc\.overflow\.2\] line 3 arithmetic overflow on signed type conversion in \(signed short int\)\(\(signed int\)x \+ 1\): FAILURE
|
||||||
|
\[inc\.overflow\.1\] line 3 arithmetic overflow on signed \+ in \(signed int\)x \+ 1: SUCCESS
|
||||||
|
--
|
||||||
|
^warning: ignoring
|
|
@ -109,8 +109,7 @@ void set_properties(
|
||||||
property_set.insert(properties.begin(), properties.end());
|
property_set.insert(properties.begin(), properties.end());
|
||||||
|
|
||||||
Forall_goto_functions(it, goto_functions)
|
Forall_goto_functions(it, goto_functions)
|
||||||
if(!it->second.is_inlined())
|
set_properties(it->second.body, property_set);
|
||||||
set_properties(it->second.body, property_set);
|
|
||||||
|
|
||||||
if(!property_set.empty())
|
if(!property_set.empty())
|
||||||
throw invalid_command_line_argument_exceptiont(
|
throw invalid_command_line_argument_exceptiont(
|
||||||
|
|
Loading…
Reference in New Issue