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>
26932693 llvm::StructType* array_type = static_cast <llvm::StructType*>(
26942694 llvm_utils->get_type_from_ttype_t_util (x.m_type , module .get ()));
26952695 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+ }
26992701 llvm_symtab[h] = ptr;
27002702 } else if (x.m_type ->type == ASR::ttypeType::Logical) {
27012703 llvm::Constant *ptr = module ->getOrInsertGlobal (x.m_name ,
You can’t perform that action at this time.
0 commit comments