Skip to content

Commit 2ad41e3

Browse files
author
Daniel Kroening
committed
properly set function id on instructions added by remove_asm
1 parent 05993f4 commit 2ad41e3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/analyses/flow_insensitive_analysis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ bool flow_insensitive_analysis_baset::do_function_call(
240240
// get the state at the beginning of the function
241241
locationt l_begin=goto_function.body.instructions.begin();
242242

243+
DATA_INVARIANT(l_begin->function == f_it->first,
244+
"function names have to match");
245+
243246
// do the edge from the call site to the beginning of the function
244247
new_data=state.transform(ns, l_call, l_begin);
245248

src/goto-programs/remove_asm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,9 @@ void remove_asmt::process_function(
467467
it->make_skip();
468468
did_something = true;
469469

470+
for(auto & instruction : tmp_dest.instructions)
471+
instruction.function = it->function;
472+
470473
goto_programt::targett next=it;
471474
next++;
472475

0 commit comments

Comments
 (0)