flow.c (split_block): Make sure bb_note is included in the new block when splitting...
authorRichard Henderson <rth@redhat.com>
Sun, 22 Jul 2001 22:49:00 +0000 (15:49 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 22 Jul 2001 22:49:00 +0000 (15:49 -0700)
        * flow.c (split_block): Make sure bb_note is included in the
        new block when splitting before a label.

From-SVN: r44250

gcc/ChangeLog
gcc/flow.c

index 989808499310ed39094c26bbc82ec277f420fc49..0b69aa3f8b499205608fcdb89d3068b571d18af0 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-22  Richard Henderson  <rth@redhat.com>
+
+       * flow.c (split_block): Make sure bb_note is included in the
+       new block when splitting before a label.
+
 Sun Jul 22 23:28:56 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * basic-block.h (redirect_edge_and_branch_force,
index a6a63e5a3ae45d390635bb603839c2ac039d303a..370b92bcbb96d40b2dfa5e6933c74c985b94722d 100644 (file)
@@ -1561,6 +1561,11 @@ split_block (bb, insn)
       bb_note = emit_note_after (NOTE_INSN_BASIC_BLOCK,
                                 new_bb->head);
       NOTE_BASIC_BLOCK (bb_note) = new_bb;
+
+      /* If the only thing in this new block was the label, make sure
+        the block note gets included.  */
+      if (new_bb->head == new_bb->end)
+       new_bb->end = bb_note;
     }
   else
     {