diff options
Diffstat (limited to 'gcc/ipa-prop.h')
-rw-r--r-- | gcc/ipa-prop.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 3ae0d1b2bd7..d5f1bc6de28 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -228,6 +228,7 @@ ipa_get_param_count (struct ipa_node_params *info) static inline tree ipa_get_param (struct ipa_node_params *info, int i) { + gcc_assert (i >= 0 && i <= info->param_count); return info->params[i].decl; } @@ -237,6 +238,7 @@ ipa_get_param (struct ipa_node_params *info, int i) static inline bool ipa_is_param_used (struct ipa_node_params *info, int i) { + gcc_assert (i >= 0 && i <= info->param_count); return info->params[i].used; } @@ -247,6 +249,7 @@ ipa_is_param_used (struct ipa_node_params *info, int i) static inline bool ipa_param_cannot_devirtualize_p (struct ipa_node_params *info, int i) { + gcc_assert (i >= 0 && i <= info->param_count); return info->params[i].cannot_devirtualize; } @@ -256,6 +259,7 @@ ipa_param_cannot_devirtualize_p (struct ipa_node_params *info, int i) static inline bool ipa_param_types_vec_empty (struct ipa_node_params *info, int i) { + gcc_assert (i >= 0 && i <= info->param_count); return info->params[i].types == NULL; } @@ -315,6 +319,7 @@ ipa_get_cs_argument_count (struct ipa_edge_args *args) static inline struct ipa_jump_func * ipa_get_ith_jump_func (struct ipa_edge_args *args, int i) { + gcc_assert (i >= 0 && i <= args->argument_count); return &args->jump_functions[i]; } @@ -528,6 +533,7 @@ tree build_ref_for_offset (location_t, tree, HOST_WIDE_INT, tree, static inline struct ipcp_lattice * ipa_get_lattice (struct ipa_node_params *info, int i) { + gcc_assert (i >= 0 && i <= info->param_count); return &(info->params[i].ipcp_lattice); } |