This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 19991023 segfault compiling XFree86
- To: Alan Modra <alan at SPRI dot Levels dot UniSA dot Edu dot Au>
- Subject: Re: 19991023 segfault compiling XFree86
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 26 Oct 1999 20:27:46 -0700
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <Pine.LNX.4.10.9910270831330.21190-100000@mullet.itr.unisa.edu.au>
On Wed, Oct 27, 1999 at 08:40:00AM +0930, Alan Modra wrote:
> Reading symbols from /usr/lib/gcc-lib/i586-linux/2.96/cc1...done.
> (gdb) info stack
> #0 make_edge (edge_cache=0x0, src=0x826b868, dst=0x0, flags=0)
> at /usr/src/egcs/gcc/flow.c:1110
This fixes it. I added the case to the testsuite.
r~
* flow.c (merge_blocks_move_predecessor_nojumps): Cope
with already adjacent blocks, but no fallthru.
(merge_blocks_move_successor_nojumps): Simplify.
(debug_flow_info): New.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.174
diff -c -p -d -r1.174 flow.c
*** flow.c 1999/10/20 14:04:01 1.174
--- flow.c 1999/10/27 03:20:06
*************** static int
*** 2011,2022 ****
merge_blocks_move_predecessor_nojumps (a, b)
basic_block a, b;
{
! rtx start, end, insertpoint, barrier;
int index;
start = a->head;
end = a->end;
- insertpoint = PREV_INSN (b->head);
/* We want to delete the BARRIER after the end of the insns we are
going to move. If we don't find a BARRIER, then do nothing. This
--- 2011,2021 ----
merge_blocks_move_predecessor_nojumps (a, b)
basic_block a, b;
{
! rtx start, end, barrier;
int index;
start = a->head;
end = a->end;
/* We want to delete the BARRIER after the end of the insns we are
going to move. If we don't find a BARRIER, then do nothing. This
*************** merge_blocks_move_predecessor_nojumps (a
*** 2042,2048 ****
start = squeeze_notes (start, end);
/* Scramble the insn chain. */
! reorder_insns (start, end, insertpoint);
if (rtl_dump_file)
{
--- 2041,2048 ----
start = squeeze_notes (start, end);
/* Scramble the insn chain. */
! if (end != PREV_INSN (b->head))
! reorder_insns (start, end, PREV_INSN (b->head));
if (rtl_dump_file)
{
*************** static int
*** 2073,2083 ****
merge_blocks_move_successor_nojumps (a, b)
basic_block a, b;
{
! rtx start, end, insertpoint, barrier;
start = b->head;
end = b->end;
- insertpoint = a->end;
/* We want to delete the BARRIER after the end of the insns we are
going to move. If we don't find a BARRIER, then do nothing. This
--- 2073,2082 ----
merge_blocks_move_successor_nojumps (a, b)
basic_block a, b;
{
! rtx start, end, barrier;
start = b->head;
end = b->end;
/* We want to delete the BARRIER after the end of the insns we are
going to move. If we don't find a BARRIER, then do nothing. This
*************** merge_blocks_move_successor_nojumps (a,
*** 2103,2109 ****
start = squeeze_notes (start, end);
/* Scramble the insn chain. */
! reorder_insns (start, end, insertpoint);
/* Now blocks A and B are contiguous. Merge them. */
merge_blocks_nomove (a, b);
--- 2102,2108 ----
start = squeeze_notes (start, end);
/* Scramble the insn chain. */
! reorder_insns (start, end, a->end);
/* Now blocks A and B are contiguous. Merge them. */
merge_blocks_nomove (a, b);
*************** dump_flow_info (file)
*** 4964,4969 ****
--- 4963,4974 ----
}
putc('\n', file);
+ }
+
+ void
+ debug_flow_info ()
+ {
+ dump_flow_info (stderr);
}
static void