Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c396abc

Browse files
committed
struct_inst_mem in pass_subroutine_from_function()
1 parent 6733b67 commit c396abc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/libasr/pass/subroutine_from_function.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,9 @@ class ReplaceFunctionCallWithSubroutineCallVisitor:
318318
}
319319

320320
void visit_Assignment(const ASR::Assignment_t &x) {
321-
bool is_target_struct_member_array_and_value_array =
322-
(ASR::is_a<ASR::StructInstanceMember_t>(*x.m_target) &&
323-
ASRUtils::is_array(ASRUtils::expr_type(x.m_value)) &&
324-
ASRUtils::is_array(ASRUtils::expr_type(x.m_target)) &&
325-
!ASR::is_a<ASR::FunctionCall_t>(*x.m_value));
326321
if( (ASR::is_a<ASR::Pointer_t>(*ASRUtils::expr_type(x.m_target)) &&
327322
ASR::is_a<ASR::GetPointer_t>(*x.m_value)) ||
328-
(ASR::is_a<ASR::ArrayConstant_t>(*x.m_value)) ||
329-
is_target_struct_member_array_and_value_array) { // TODO: fix for StructInstanceMember targets
323+
(ASR::is_a<ASR::ArrayConstant_t>(*x.m_value))) {
330324
return ;
331325
}
332326

0 commit comments

Comments
 (0)