diff options
author | Richard Henderson <rth@redhat.com> | 2004-09-11 13:07:11 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-09-11 13:07:11 -0700 |
commit | f4a6d54edd0ad80bcad9573d1cba9ded7f7e995c (patch) | |
tree | 8c2e23decfbecbb98c4a72def6aa1886c81fad1e /gcc/cfgexpand.c | |
parent | 1d1df0df43b306fef358d1d3f1378b593a75d5a9 (diff) | |
download | gcc-f4a6d54edd0ad80bcad9573d1cba9ded7f7e995c.tar.gz |
re PR middle-end/17416 (stack variable merging doesn't work)
PR middle-end/17416
* cfgexpand.c (expand_used_vars_for_block): Fix off-by-one bug
in conflict loop.
From-SVN: r87366
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b73445d0b18..71dd039ca31 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -670,12 +670,8 @@ expand_used_vars_for_block (tree block, bool toplevel) resize_stack_vars_conflict (new_sv_num); for (i = old_sv_num; i < new_sv_num; ++i) - for (j = i < this_sv_num ? i : this_sv_num; ; --j) - { - add_stack_var_conflict (i, j); - if (j == old_sv_num) - break; - } + for (j = i < this_sv_num ? i+1 : this_sv_num; j-- > old_sv_num ;) + add_stack_var_conflict (i, j); } } |