This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[rtlopt] bb-reorder warning fix
- From: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Andreas Jaeger <aj at suse dot de>, Jan Hubicka <jh at suse dot cz>
- Date: Mon, 30 Dec 2002 14:37:15 +0100
- Subject: [rtlopt] bb-reorder warning fix
Hi,
this patch gets rid of the warning
"`next_bb' might be used uninitialized in this function"
Bootstrapped i386.
I'm commiting it as obvious to rtlopt branch.
Josef
Mon Dec 30 14:35:14 CET 2002 Josef Zlomek <zlomekj@suse.cz>
* bb-reorder.c (connect_traces): Get rid of warning.
Index: bb-reorder.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bb-reorder.c,v
retrieving revision 1.50.2.17
diff -c -3 -p -r1.50.2.17 bb-reorder.c
*** bb-reorder.c 16 Dec 2002 19:22:18 -0000 1.50.2.17
--- bb-reorder.c 30 Dec 2002 10:23:04 -0000
*************** connect_traces (n_traces, traces)
*** 906,912 ****
{
/* Try to connect the traces by duplication of 1 block. */
edge e2;
! basic_block next_bb;
for (e = traces[t].last->succ; e; e = e->succ_next)
if (e->dest != EXIT_BLOCK_PTR
--- 906,912 ----
{
/* Try to connect the traces by duplication of 1 block. */
edge e2;
! basic_block next_bb = NULL;
for (e = traces[t].last->succ; e; e = e->succ_next)
if (e->dest != EXIT_BLOCK_PTR
*************** connect_traces (n_traces, traces)
*** 947,953 ****
}
}
}
! if (best && copy_bb_p (best->dest))
{
basic_block new_bb;
--- 947,953 ----
}
}
}
! if (best && next_bb && copy_bb_p (best->dest))
{
basic_block new_bb;