* except.c (label_to_region_map): Fix thinko.

From-SVN: r145304
This commit is contained in:
Jan Hubicka 2009-03-30 18:49:52 +02:00 committed by Jan Hubicka
parent f4d9f129fe
commit 4c936d4f4c
2 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,7 @@
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>
PR middle-end/38237

View File

@ -798,12 +798,9 @@ label_to_region_map (void)
for (i = cfun->eh->last_region_number; i > 0; --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),
i);
}