From 6038d2c64ce2520c9f7acd677c1a91bdebc4e64d Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Sun, 24 Sep 2023 14:14:50 +0530 Subject: [PATCH] Added symbolic_vars_to_omit to handle corner cases --- src/libasr/pass/replace_symbolic.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libasr/pass/replace_symbolic.cpp b/src/libasr/pass/replace_symbolic.cpp index 7c139d904d2..7531c1ffeb8 100644 --- a/src/libasr/pass/replace_symbolic.cpp +++ b/src/libasr/pass/replace_symbolic.cpp @@ -46,6 +46,7 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor symbolic_dependencies; std::set symbolic_vars_to_free; + std::set symbolic_vars_to_omit; SymEngine_Stack symengine_stack; void visit_Function(const ASR::Function_t &x) { @@ -94,6 +95,7 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor call_args; call_args.reserve(al, 1); ASR::call_arg_t call_arg; @@ -119,10 +121,10 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor((ASR::asr_t*)&xx)); if(xx.m_intent == ASR::intentType::In){ - return; + symbolic_vars_to_omit.insert(ASR::down_cast((ASR::asr_t*)&xx)); } - symbolic_vars_to_free.insert(ASR::down_cast((ASR::asr_t*)&xx)); if(xx.m_intent == ASR::intentType::Local){ ASR::ttype_t *type2 = ASRUtils::TYPE(ASR::make_Integer_t(al, xx.base.base.loc, 8));