]> granicus.if.org Git - vim/commitdiff
patch 8.2.2516: test failure on s390 v8.2.2516
authorBram Moolenaar <Bram@vim.org>
Sun, 14 Feb 2021 15:34:59 +0000 (16:34 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 14 Feb 2021 15:34:59 +0000 (16:34 +0100)
Problem:    Test failure on s390. (analyses by James McCoy)
Solution:   Only set the try_finally label when not skipping.

src/version.c
src/vim9compile.c

index f856d83a5d36753d792c7411771efa956e319cf4..c3b73a58afedc664d9ec5d9d2b90440376a47f5c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2516,
 /**/
     2515,
 /**/
index 5742123c06d33cbb3687439c6a49939931265647..6d0a748824cee6a2841c0ce051feebe3ddf61bab 100644 (file)
@@ -7719,17 +7719,21 @@ compile_endtry(char_u *arg, cctx_T *cctx)
 
     compile_endblock(cctx);
 
-    if (try_isn->isn_arg.try.try_finally == 0)
-       // No :finally encountered, use the try_finaly field to point to
-       // ENDTRY, so that TRYCONT can jump there.
-       try_isn->isn_arg.try.try_finally = cctx->ctx_instr.ga_len;
+    if (cctx->ctx_skip != SKIP_YES)
+    {
+       if (try_isn->isn_arg.try.try_finally == 0)
+           // No :finally encountered, use the try_finaly field to point to
+           // ENDTRY, so that TRYCONT can jump there.
+           try_isn->isn_arg.try.try_finally = instr->ga_len;
 
-    if (cctx->ctx_skip != SKIP_YES && generate_instr(cctx, ISN_ENDTRY) == NULL)
-       return NULL;
+       if (cctx->ctx_skip != SKIP_YES
+                                  && generate_instr(cctx, ISN_ENDTRY) == NULL)
+           return NULL;
 #ifdef FEAT_PROFILE
        if (cctx->ctx_profiling)
            generate_instr(cctx, ISN_PROF_START);
 #endif
+    }
     return arg;
 }