File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2693,9 +2693,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
2693
2693
llvm::StructType* array_type = static_cast <llvm::StructType*>(
2694
2694
llvm_utils->get_type_from_ttype_t_util (x.m_type , module .get ()));
2695
2695
llvm::Constant *ptr = module ->getOrInsertGlobal (x.m_name , array_type);
2696
- module ->getNamedGlobal (x.m_name )->setInitializer (
2697
- llvm::ConstantStruct::get (array_type,
2698
- llvm::Constant::getNullValue (array_type)));
2696
+ if (!external) {
2697
+ module ->getNamedGlobal (x.m_name )->setInitializer (
2698
+ llvm::ConstantStruct::get (array_type,
2699
+ llvm::Constant::getNullValue (array_type)));
2700
+ }
2699
2701
llvm_symtab[h] = ptr;
2700
2702
} else if (x.m_type ->type == ASR::ttypeType::Logical) {
2701
2703
llvm::Constant *ptr = module ->getOrInsertGlobal (x.m_name ,
You can’t perform that action at this time.
0 commit comments