diff --git a/sapfor/experts/Sapfor_2017/_src/Transformations/private_removing.cpp b/sapfor/experts/Sapfor_2017/_src/Transformations/private_removing.cpp index ed08c73..0a59ed6 100644 --- a/sapfor/experts/Sapfor_2017/_src/Transformations/private_removing.cpp +++ b/sapfor/experts/Sapfor_2017/_src/Transformations/private_removing.cpp @@ -1642,6 +1642,9 @@ static vector buildDefUsePairs(Context* ctx, const CFG_Type& CF for (auto& instruction : blockInstructionsVector) { SgStatement* stmt = instruction->getInstruction()->getOperator(); + if (stmt == useInsertedStmt.insertedStmt) + break; + if (stmt->variant() == ASSIGN_STAT && stmt->expr(0)->symbol()->identifier() == defVarName && !isVarChangedBetween(defVarName, stmt, useInsertedStmt.insertedStmt))