Fix ICE in remap_arguments with removed parameters.
* ipa-modref.c (remap_arguments): Check range in map access.
This commit is contained in:
parent
5d2cedaaa3
commit
988f0466e8
1 changed files with 6 additions and 1 deletions
|
@ -1333,7 +1333,12 @@ remap_arguments (vec <int> *map, modref_records *tt)
|
|||
modref_access_node *access_node;
|
||||
FOR_EACH_VEC_SAFE_ELT (ref_node->accesses, k, access_node)
|
||||
if (access_node->parm_index > 0)
|
||||
access_node->parm_index = (*map)[access_node->parm_index];
|
||||
{
|
||||
if (access_node->parm_index < (int)map->length ())
|
||||
access_node->parm_index = (*map)[access_node->parm_index];
|
||||
else
|
||||
access_node->parm_index = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue