Skip to content

Commit 141223a

Browse files
authored
Merge pull request #4260 from peterschrammel/fix-set-properties-inline
Consider properties of inline functions
2 parents 81bc65f + ffd6d38 commit 141223a

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
static inline short inc(short x)
2+
{
3+
return x + 1;
4+
}
5+
6+
void main()
7+
{
8+
short z;
9+
inc(z);
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
main.c
3+
--property inc.overflow.1 --property inc.overflow.2 --slice-formula --signed-overflow-check --conversion-check
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
VERIFICATION FAILED
7+
\[inc\.overflow\.2\] line 3 arithmetic overflow on signed type conversion in \(signed short int\)\(\(signed int\)x \+ 1\): FAILURE
8+
\[inc\.overflow\.1\] line 3 arithmetic overflow on signed \+ in \(signed int\)x \+ 1: SUCCESS
9+
--
10+
^warning: ignoring

src/goto-programs/set_properties.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ void set_properties(
109109
property_set.insert(properties.begin(), properties.end());
110110

111111
Forall_goto_functions(it, goto_functions)
112-
if(!it->second.is_inlined())
113-
set_properties(it->second.body, property_set);
112+
set_properties(it->second.body, property_set);
114113

115114
if(!property_set.empty())
116115
throw invalid_command_line_argument_exceptiont(

0 commit comments

Comments
 (0)