Skip to content

Commit b2a8610

Browse files
fix CI
1 parent baafdce commit b2a8610

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/libasr/pass/global_stmts.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void pass_wrap_global_stmts(Allocator &al,
3131
char *fn_name = s.c_str(al);
3232
SymbolTable *fn_scope = al.make_new<SymbolTable>(unit.m_symtab);
3333

34-
ASR::ttype_t *type;
34+
ASR::ttype_t *type = nullptr;
3535
Location loc = unit.base.base.loc;
3636
ASR::asr_t *return_var=nullptr;
3737
ASR::expr_t *return_var_ref=nullptr;
@@ -82,6 +82,9 @@ void pass_wrap_global_stmts(Allocator &al,
8282

8383
if (return_var) {
8484
// The last defined `return_var` is the actual return value
85+
LCOMPILERS_ASSERT(type)
86+
LCOMPILERS_ASSERT(return_var_ref)
87+
8588
ASR::down_cast2<ASR::Variable_t>(return_var)->m_intent = ASRUtils::intent_return_var;
8689
std::string global_underscore_name = "_" + fn_name_s;
8790
s.from_str(al, global_underscore_name);

0 commit comments

Comments
 (0)