Skip to content

Commit a2cf0d2

Browse files
Assign unit location for the "_lpython_main_program" function
1 parent 1248c12 commit a2cf0d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libasr/pass/global_stmts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void pass_wrap_global_stmts_into_function(Allocator &al,
2929
SymbolTable *fn_scope = al.make_new<SymbolTable>(unit.m_global_scope);
3030

3131
ASR::ttype_t *type;
32-
Location loc;
32+
Location loc = unit.base.base.loc;
3333
ASR::asr_t *return_var=nullptr;
3434
ASR::expr_t *return_var_ref=nullptr;
3535
char *var_name;

0 commit comments

Comments
 (0)