We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8f58d0 commit 0738b54Copy full SHA for 0738b54
src/libasr/codegen/asr_to_llvm.cpp
@@ -2353,8 +2353,9 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
2353
this->visit_expr_wrapper(x.m_symbolic_value, true);
2354
init_value = llvm::dyn_cast<llvm::Constant>(tmp);
2355
}
2356
- if (x.m_type->type == ASR::ttypeType::Integer) {
2357
- int a_kind = down_cast<ASR::Integer_t>(x.m_type)->m_kind;
+ if (x.m_type->type == ASR::ttypeType::Integer
+ || x.m_type->type == ASR::ttypeType::UnsignedInteger) {
2358
+ int a_kind = ASRUtils::extract_kind_from_ttype_t(x.m_type);
2359
llvm::Type *type;
2360
int init_value_bits = 8*a_kind;
2361
type = llvm_utils->getIntType(a_kind);
0 commit comments