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:
Peter Schrammel 2019-02-22 17:11:28 +00:00
parent 95e15fdbc2
commit ffd6d3823e
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,10 @@
static inline short inc(short x)
{
return x + 1;
}
void main()
{
short z;
inc(z);
}

View File

@ -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

View File

@ -109,7 +109,6 @@ 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())