File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 33#include < chrono>
44#include < iomanip>
55#include < fstream>
6+ #include < climits>
67
78#include < libasr/asr.h>
89#include < libasr/exception.h>
@@ -526,7 +527,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
526527
527528 using namespace wasm ;
528529 int kind = ASRUtils::extract_kind_from_ttype_t (v->m_type );
529- uint32_t global_var_idx = - 1 ;
530+ uint32_t global_var_idx = UINT_MAX ;
530531 switch (v->m_type ->type ){
531532 case ASR::ttypeType::Integer: {
532533 uint64_t init_val = 0 ;
@@ -583,7 +584,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
583584 global_var_idx = m_wa.declare_global_var (i32 , 0 );
584585 }
585586 }
586- LCOMPILERS_ASSERT (global_var_idx >= 0 );
587+ LCOMPILERS_ASSERT (global_var_idx < UINT_MAX );
587588 m_global_var_idx_map[get_hash ((ASR::asr_t *)v)] = global_var_idx;
588589 }
589590
You can’t perform that action at this time.
0 commit comments