Commit 4c936d4f by Jan Hubicka Committed by Jan Hubicka

* except.c (label_to_region_map): Fix thinko.

From-SVN: r145304
parent f4d9f129
2009-03-30 Jan Hubicka <jh@suse.cz>
* except.c (label_to_region_map): Fix thinko.
2009-03-30 Steve Ellcey <sje@cup.hp.com> 2009-03-30 Steve Ellcey <sje@cup.hp.com>
PR middle-end/38237 PR middle-end/38237
......
...@@ -798,12 +798,9 @@ label_to_region_map (void) ...@@ -798,12 +798,9 @@ label_to_region_map (void)
for (i = cfun->eh->last_region_number; i > 0; --i) for (i = cfun->eh->last_region_number; i > 0; --i)
{ {
struct eh_region *r = VEC_index (eh_region, cfun->eh->region_array, i); struct eh_region *r = VEC_index (eh_region, cfun->eh->region_array, i);
if (r && r->tree_label && LABEL_DECL_UID (r->tree_label) >= 0) if (r && r->region_number == i
&& r->tree_label && LABEL_DECL_UID (r->tree_label) >= 0)
{ {
if ((unsigned) LABEL_DECL_UID (r->tree_label) >
VEC_length (int, label_to_region))
VEC_safe_grow_cleared (int, heap, label_to_region,
LABEL_DECL_UID (r->tree_label));
VEC_replace (int, label_to_region, LABEL_DECL_UID (r->tree_label), VEC_replace (int, label_to_region, LABEL_DECL_UID (r->tree_label),
i); i);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment