]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cfganal.c (can_fallthru): Fix fast path.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 May 2002 12:56:47 +0000 (12:56 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 May 2002 12:56:47 +0000 (12:56 +0000)
* cfgrtl.c (verify_flow_info): Avoid crash on conditionals
with edges to the next block.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53327 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfganal.c
gcc/cfgrtl.c

index 5100e798097b24994c466d6f8198c3703f4353b6..881dfe7116511d3ac59a705bc674ba12d916f244 100644 (file)
@@ -1,3 +1,9 @@
+Thu May  9 14:55:39 CEST 2002  Jan Hubicka  <jh@suse.cz>
+
+       * cfganal.c (can_fallthru): Fix fast path.
+       * cfgrtl.c (verify_flow_info): Avoid crash on conditionals
+       with edges to the next block.
+
 Thu May  9 14:52:45 CEST 2002  Jan Hubicka  <jh@suse.cz>
                               Pavel Nejedly  <bim@atrey.karlin.mff.cuni.cz>
 
index 46c4758d3e7b78c807606a95485e1b11d28a7375..f70c6c7b2fc3229be141e8d31c35217afaf1dd90 100644 (file)
@@ -87,7 +87,10 @@ can_fallthru (src, target)
   rtx insn = src->end;
   rtx insn2 = target->head;
 
-  if (src->index + 1 == target->index && !active_insn_p (insn2))
+  if (src->index + 1 != target->index)
+    return 0;
+
+  if (!active_insn_p (insn2))
     insn2 = next_active_insn (insn2);
 
   /* ??? Later we may add code to move jump tables offline.  */
index d96f677c9896319da02175947c6e3fea6b22d1c6..cd3369c542e5879810c27a59609cde761c263d8e 100644 (file)
@@ -1782,6 +1782,7 @@ verify_flow_info ()
 
       if (INSN_P (bb->end)
          && (note = find_reg_note (bb->end, REG_BR_PROB, NULL_RTX))
+         && bb->succ && bb->succ->succ_next
          && any_condjump_p (bb->end))
        {
          if (INTVAL (XEXP (note, 0)) != BRANCH_EDGE (bb)->probability)