This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tree-cfg.c: Fix a typo.


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

Tested on i686-pc-linux-gnu.  Committed as obvious.

Kazu Hirata

2005-05-03  Kazu Hirata  <>

	* 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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]