@@ -269,10 +269,16 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
269269
270270 ASR::ttype_t * f_signature= xx.m_function_signature ;
271271 ASR::FunctionType_t *f_type = ASR::down_cast<ASR::FunctionType_t>(f_signature);
272- ASR::ttype_t *type1 = ASRUtils::TYPE (ASR::make_CPtr_t (al, xx.base .base .loc ));
272+ ASR::ttype_t *CPtr_type = ASRUtils::TYPE (ASR::make_CPtr_t (al, xx.base .base .loc ));
273273 for (size_t i = 0 ; i < f_type->n_arg_types ; ++i) {
274274 if (f_type->m_arg_types [i]->type == ASR::ttypeType::SymbolicExpression) {
275- f_type->m_arg_types [i] = type1;
275+ f_type->m_arg_types [i] = CPtr_type;
276+ } else if (f_type->m_arg_types [i]->type == ASR::ttypeType::List) {
277+ ASR::List_t* list = ASR::down_cast<ASR::List_t>(f_type->m_arg_types [i]);
278+ if (list->m_type ->type == ASR::ttypeType::SymbolicExpression){
279+ ASR::ttype_t * list_type = ASRUtils::TYPE (ASR::make_List_t (al, xx.base .base .loc , CPtr_type));
280+ f_type->m_arg_types [i] = list_type;
281+ }
276282 }
277283 }
278284
@@ -592,6 +598,17 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
592598 ASR::expr_t * function_call = process_attributes (xx.base .base .loc , xx.m_test );
593599 xx.m_test = function_call;
594600 }
601+ } else if (ASR::is_a<ASR::LogicalNot_t>(*xx.m_test )) {
602+ ASR::LogicalNot_t* logical_not = ASR::down_cast<ASR::LogicalNot_t>(xx.m_test );
603+ if (ASR::is_a<ASR::IntrinsicScalarFunction_t>(*logical_not->m_arg )) {
604+ ASR::IntrinsicScalarFunction_t* intrinsic_func = ASR::down_cast<ASR::IntrinsicScalarFunction_t>(logical_not->m_arg );
605+ if (intrinsic_func->m_type ->type == ASR::ttypeType::Logical) {
606+ ASR::expr_t * function_call = process_attributes (xx.base .base .loc , logical_not->m_arg );
607+ ASR::expr_t * new_logical_not = ASRUtils::EXPR (ASR::make_LogicalNot_t (al, xx.base .base .loc , function_call,
608+ logical_not->m_type , logical_not->m_value ));
609+ xx.m_test = new_logical_not;
610+ }
611+ }
595612 }
596613 }
597614
0 commit comments