This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[3.3 PATCH] PR rtl-opt/17363: Backport PR 11593 fix
- From: Roger Sayle <roger at eyesopen dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Date: Mon, 20 Sep 2004 15:25:17 -0600 (MDT)
- Subject: [3.3 PATCH] PR rtl-opt/17363: Backport PR 11593 fix
I'm guessing this fix is too late for gcc 3.3.5, but I've analysed
PR rtl-optimization/17363 which is an "infinite-loop in compiler"
regression on the 3.3 branch. Investigating further, the infinite
loop is in sched-rgn.c, and this problem is actually a "duplicate"
of PR bootstrap/11593 that was fixed on 3.4 and mainline. I've
confirmed on alphaev67-dec-osf5.1 that backporting Zdenek's fix for
11593 resolves 17363.
The following patch has been tested against the gcc-3_3-branch on
both alphaev67-dec-osf5.1 and i686-pc-linux-gnu with a full "make
bootstrap", all default languages, and regression tested with a
top-level "make -k check" with no new failures on either target.
Ok for the gcc-3_3-branch?
2004-09-20 Roger Sayle <roger@eyesopen.com>
PR rtl-optimization/17363
Backport from mainline
2003-07-19 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
PR bootstrap/11593
* sched-rgn.c (find_rgns): Initialize current_edge correctly.
Index: sched-rgn.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-rgn.c,v
retrieving revision 1.50.2.1
diff -c -3 -p -r1.50.2.1 sched-rgn.c
*** sched-rgn.c 15 Jul 2003 13:09:12 -0000 1.50.2.1
--- sched-rgn.c 20 Sep 2004 00:47:09 -0000
*************** find_rgns (edge_list, dom)
*** 626,632 ****
int *max_hdr, *dfs_nr, *stack, *degree;
char no_loops = 1;
int node, child, loop_head, i, head, tail;
! int count = 0, sp, idx = 0, current_edge = out_edges[0];
int num_bbs, num_insns, unreachable;
int too_large_failure;
basic_block bb;
--- 626,633 ----
int *max_hdr, *dfs_nr, *stack, *degree;
char no_loops = 1;
int node, child, loop_head, i, head, tail;
! int count = 0, sp, idx = 0;
! int current_edge = out_edges[ENTRY_BLOCK_PTR->succ->dest->index];
int num_bbs, num_insns, unreachable;
int too_large_failure;
basic_block bb;
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833