diff options
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index e4789a79694..74d5f3de38c 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -947,9 +947,9 @@ expand_fixups (first_insn) Gotos that jump out of this contour must restore the stack level and do the cleanups before actually jumping. - DONT_JUMP_IN nonzero means report error there is a jump into this - contour from before the beginning of the contour. - This is also done if STACK_LEVEL is nonzero. */ + DONT_JUMP_IN positive means report error if there is a jump into this + contour from before the beginning of the contour. This is also done if + STACK_LEVEL is nonzero unless DONT_JUMP_IN is negative. */ static void fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in) @@ -991,7 +991,8 @@ fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in) It detects only a problem with the innermost block around the label. */ if (f->target != 0 - && (dont_jump_in || stack_level || cleanup_list) + && (dont_jump_in > 0 || (dont_jump_in == 0 && stack_level) + || cleanup_list) && INSN_UID (first_insn) < INSN_UID (f->target_rtl) && INSN_UID (first_insn) > INSN_UID (f->before_jump) && ! DECL_ERROR_ISSUED (f->target)) @@ -3714,8 +3715,10 @@ warn_about_unused_variables (vars) MARK_ENDS is nonzero if we should put a note at the beginning and end of this binding contour. - DONT_JUMP_IN is nonzero if it is not valid to jump into this contour. - (That is true automatically if the contour has a saved stack level.) */ + DONT_JUMP_IN is positive if it is not valid to jump into this contour, + zero if we can jump into this contour only if it does not have a saved + stack level, and negative if we are not to check for invalid use of + labels (because the front end does that). */ void expand_end_bindings (vars, mark_ends, dont_jump_in) @@ -3750,8 +3753,8 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) /* Don't allow jumping into a block that has a stack level. Cleanups are allowed, though. */ - if (dont_jump_in - || thisblock->data.block.stack_level != 0) + if (dont_jump_in > 0 + || (dont_jump_in == 0 && thisblock->data.block.stack_level != 0)) { struct label_chain *chain; |