This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] tree-cfg.c: Fix a typo.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 03 May 2005 12:30:30 -0400 (EDT)
- Subject: [patch] tree-cfg.c: Fix a typo.
Hi,
Attached is a patch to fix a typo.
When I sped up the "for" loop shown in the patch a while ago by
reversing the direction of the walk from forward to backward, I
changed bsi_start to bsi_last but apparently forgot to change bsi_next
to bsi_prev. Sorry!
Interestingly, all we care about here is whether we have a non-label
statement or not, so checking the last statement usually suffices
unless we have a non-local label, which is exactly why this typo has
not caused any problem. After all, a non-local label isn't very
common.
Tested on i686-pc-linux-gnu. Committed as obvious.
Kazu Hirata
2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (tree_forwarder_block_p): Fix a typo.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.182
diff -u -d -p -r2.182 tree-cfg.c
--- tree-cfg.c 26 Apr 2005 17:11:18 -0000 2.182
+++ tree-cfg.c 2 May 2005 16:23:37 -0000
@@ -4029,7 +4029,7 @@ tree_forwarder_block_p (basic_block bb,
/* Now walk through the statements backward. We can ignore labels,
anything else means this is not a forwarder block. */
- for (bsi = bsi_last (bb); !bsi_end_p (bsi); bsi_next (&bsi))
+ for (bsi = bsi_last (bb); !bsi_end_p (bsi); bsi_prev (&bsi))
{
tree stmt = bsi_stmt (bsi);