stmt.c (fixup_gotos): Change meaning of DONT_JUMP_IN.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Wed, 5 Mar 2003 23:56:15 +0000 (23:56 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 5 Mar 2003 23:56:15 +0000 (18:56 -0500)
* stmt.c (fixup_gotos): Change meaning of DONT_JUMP_IN.
(expand_end_bindings): Likewise.

From-SVN: r63874

gcc/ChangeLog
gcc/stmt.c

index 14ede67987a2a6dbfd56c754c57af88574b59593..8a7b8b3f6c55e3513e68e81d122c2ad9d9937cb1 100644 (file)
@@ -1,3 +1,8 @@
+Wed Mar  5 18:55:02 2003  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * stmt.c (fixup_gotos): Change meaning of DONT_JUMP_IN.
+       (expand_end_bindings): Likewise.
+
 2003-03-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.md (return_external_pic): Add !TARGET_PA_20 to constraint.
index e4789a79694c36d3702a5001417faf59f5bddf53..74d5f3de38c16165907d686653114366b3d163a4 100644 (file)
@@ -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;