File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1223,7 +1223,10 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
1223
1223
std::vector<llvm::Value*> indices;
1224
1224
for ( size_t r = 0 ; r < x.n_args ; r++ ) {
1225
1225
ASR::array_index_t curr_idx = x.m_args [r];
1226
+ uint64_t ptr_loads_copy = ptr_loads;
1227
+ ptr_loads = 2 ;
1226
1228
this ->visit_expr_wrapper (curr_idx.m_right , true );
1229
+ ptr_loads = ptr_loads_copy;
1227
1230
indices.push_back (tmp);
1228
1231
}
1229
1232
if (v->m_type ->type == ASR::ttypeType::Pointer) {
@@ -2376,6 +2379,9 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
2376
2379
case (ASR::ttypeType::Logical) :
2377
2380
return_type = llvm::Type::getInt1Ty (context);
2378
2381
break ;
2382
+ case (ASR::ttypeType::CPtr) :
2383
+ return_type = llvm::Type::getVoidTy (context)->getPointerTo ();
2384
+ break ;
2379
2385
case (ASR::ttypeType::Derived) :
2380
2386
throw CodeGenError (" Derived return type not implemented yet" );
2381
2387
break ;
You can’t perform that action at this time.
0 commit comments