Browse Source

Increase reference count of jump label, fixes #39784

ccrause 3 years ago
parent
commit
7822a90e20
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compiler/avr/aasmcpu.pas

+ 1 - 0
compiler/avr/aasmcpu.pas

@@ -486,6 +486,7 @@ implementation
                               else
                               else
                                 begin
                                 begin
                                   current_asmdata.getjumplabel(l);
                                   current_asmdata.getjumplabel(l);
+                                  l.increfs;
                                   list.insertafter(tai_label.create(l),curtai);
                                   list.insertafter(tai_label.create(l),curtai);
                                   if CPUAVR_HAS_JMP_CALL in cpu_capabilities[current_settings.cputype] then
                                   if CPUAVR_HAS_JMP_CALL in cpu_capabilities[current_settings.cputype] then
                                     list.insertafter(taicpu.op_sym(A_JMP,taicpu(curtai).oper[0]^.ref^.symbol),curtai)
                                     list.insertafter(taicpu.op_sym(A_JMP,taicpu(curtai).oper[0]^.ref^.symbol),curtai)