diff --git a/compiler/wasm32/hlcgcpu.pas b/compiler/wasm32/hlcgcpu.pas
index 116a54081d..1af530f06b 100644
--- a/compiler/wasm32/hlcgcpu.pas
+++ b/compiler/wasm32/hlcgcpu.pas
@@ -2164,8 +2164,10 @@ implementation
       if not(cs_check_overflow in current_settings.localswitches) then
         exit;
       current_asmdata.getjumplabel(hl);
+      list.concat(taicpu.op_none(a_block));
       a_cmp_const_loc_label(list,s32inttype,OC_EQ,0,ovloc,hl);
       g_call_system_proc(list,'fpc_overflow',[],nil);
+      list.concat(taicpu.op_none(a_end_block));
       a_label(list,hl);
     end;