File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7766,9 +7766,9 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
77667766 if (llvm_symtab.find (h) != llvm_symtab.end ()) {
77677767 tmp = llvm_symtab[h];
77687768 if ( !ASRUtils::is_array (arg->m_type ) ) {
7769-
77707769 if (x_abi == ASR::abiType::Source && ASR::is_a<ASR::CPtr_t>(*arg->m_type )) {
7771- if (arg->m_intent == intent_local) {
7770+ if ( orig_arg_intent != ASRUtils::intent_out &&
7771+ arg->m_intent == intent_local ) {
77727772 // Local variable of type
77737773 // CPtr is a void**, so we
77747774 // have to load it
@@ -7815,9 +7815,10 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
78157815 }
78167816 }
78177817 } else if (is_a<ASR::CPtr_t>(*arg_type)) {
7818- if (arg->m_intent == intent_local) {
7819- // Local variable of type
7820- // CPtr is a void**, so we
7818+ if ( arg->m_intent == intent_local ||
7819+ arg->m_intent == ASRUtils::intent_out) {
7820+ // Local variable or Dummy out argument
7821+ // of type CPtr is a void**, so we
78217822 // have to load it
78227823 tmp = CreateLoad (tmp);
78237824 }
You can’t perform that action at this time.
0 commit comments