@@ -46,7 +46,6 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
46
46
}
47
47
std::vector<std::string> symbolic_dependencies;
48
48
std::set<ASR::symbol_t *> symbolic_vars_to_free;
49
- std::set<ASR::symbol_t *> symbolic_vars_to_omit;
50
49
SymEngine_Stack symengine_stack;
51
50
52
51
void visit_Function (const ASR::Function_t &x) {
@@ -95,7 +94,6 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
95
94
func_body.from_pointer_n_copy (al, xx.m_body , xx.n_body );
96
95
97
96
for (ASR::symbol_t * symbol : symbolic_vars_to_free) {
98
- if (symbolic_vars_to_omit.find (symbol) != symbolic_vars_to_omit.end ()) continue ;
99
97
Vec<ASR::call_arg_t > call_args;
100
98
call_args.reserve (al, 1 );
101
99
ASR::call_arg_t call_arg;
@@ -121,10 +119,10 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
121
119
122
120
ASR::ttype_t *type1 = ASRUtils::TYPE (ASR::make_CPtr_t (al, xx.base .base .loc ));
123
121
xx.m_type = type1;
124
- symbolic_vars_to_free.insert (ASR::down_cast<ASR::symbol_t >((ASR::asr_t *)&xx));
125
122
if (xx.m_intent == ASR::intentType::In){
126
- symbolic_vars_to_omit. insert (ASR::down_cast<ASR:: symbol_t >((ASR:: asr_t *)&xx)) ;
123
+ return ;
127
124
}
125
+ symbolic_vars_to_free.insert (ASR::down_cast<ASR::symbol_t >((ASR::asr_t *)&xx));
128
126
129
127
if (xx.m_intent == ASR::intentType::Local){
130
128
ASR::ttype_t *type2 = ASRUtils::TYPE (ASR::make_Integer_t (al, xx.base .base .loc , 8 ));
0 commit comments