This is the mail archive of the
mailing list for the GCC project.
- To: egcs-patches at egcs dot cygnus dot com
- Subject: flow bugfix
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Mon, 08 Mar 1999 15:41:34 -0700
- Reply-To: law at cygnus dot com
This fixes a recently reported problem on f771 aborting on the x86 with
Due to optimizations in flow we end up with a conditional branch to the
Merge blocks deletes the conditional branch. However, flow does not delete
the insn that sets cc0.
This causes indigestion in reg-stack later.
* flow.c (merge_blocks_nomove): For HAVE_cc0 targets, make sure
to also delete the cc0 setter when deleting a conditional branch
to the next block.
RCS file: /egcs/carton/cvsfiles/egcs/gcc/flow.c,v
retrieving revision 1.103
diff -c -3 -p -r1.103 flow.c
*** flow.c 1999/03/06 17:19:39 1.103
--- flow.c 1999/03/08 22:39:10
*************** merge_blocks_nomove (a, b)
*** 1821,1827 ****
--- 1821,1840 ----
rtx tmp = a->end;
a->end = prev_nonnote_insn (tmp);
+ #ifdef HAVE_cc0
+ /* If this was a conditional jump, we need to also delete
+ the insn that set cc0. */
+ if (! simplejump_p (tmp) && condjump_p (tmp))
+ PUT_CODE (PREV_INSN (tmp), NOTE);
+ NOTE_LINE_NUMBER (PREV_INSN (tmp)) = NOTE_INSN_DELETED;
+ NOTE_SOURCE_FILE (PREV_INSN (tmp)) = 0;