Skip to content

Commit

Permalink
Fixing symbolic compare for test_gruntz.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Feb 8, 2024
1 parent 6285062 commit f6613bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libasr/pass/replace_symbolic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,15 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
xx.m_test = new_logical_not;
}
}
} else if (ASR::is_a<ASR::SymbolicCompare_t>(*xx.m_test)) {
ASR::SymbolicCompare_t *s = ASR::down_cast<ASR::SymbolicCompare_t>(xx.m_test);
ASR::expr_t* function_call = nullptr;
if (s->m_op == ASR::cmpopType::Eq) {
function_call = basic_compare(xx.base.base.loc, "basic_eq", s->m_left, s->m_right);
} else {
function_call = basic_compare(xx.base.base.loc, "basic_neq", s->m_left, s->m_right);
}
xx.m_test = function_call;
}
}

Expand Down

0 comments on commit f6613bf

Please sign in to comment.