Skip to content

Commit fbc712c

Browse files
Merge pull request #1 from thk123/no-inline-start-function-calls
Do not partially inline functions called from _start This allows us to unambiguously identify the binding of the arguments to the parameters of entry point function.
2 parents 8eb9525 + f8a1bad commit fbc712c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/goto-programs/goto_inline.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,17 @@ void goto_partial_inline(
826826
it=goto_functions.function_map.begin();
827827
it!=goto_functions.function_map.end();
828828
it++)
829-
if(it->second.body_available())
829+
{
830+
// We can't take functions without bodies to find functions
831+
// inside them to be inlined.
832+
// We also don't allow for the _start function to have any of its
833+
// function calls to be inlined
834+
if(it->second.body_available() &&
835+
it->first!=ID__start)
836+
{
830837
goto_inline.goto_inline_rec(it, false);
838+
}
839+
}
831840
}
832841

833842
catch(int)

0 commit comments

Comments
 (0)