2 // { dg-options "-fno-short-enums" }
4 typedef union tree_node *tree;
5 typedef union gimple_statement_d *gimple;
6 struct vec_prefix { unsigned num_; };
7 template<typename T> struct vec_t {
8 unsigned length (void) const;
9 T &operator[] (unsigned);
13 template<typename T> inline unsigned vec_t<T>::length (void) const {
16 template<typename T> T & vec_t<T>::operator[] (unsigned ix) {
17 ((void)(__builtin_expect(!(ix < prefix_.num_), 0) ? __builtin_unreachable(), 0 : 0));
20 enum tree_code { PARM_DECL };
22 enum tree_code code : 16;
23 unsigned default_def_flag : 1;
26 struct tree_base base;
28 struct ipa_param_descriptor {
32 typedef struct ipa_param_descriptor ipa_param_descriptor_t;
33 struct ipa_node_params {
34 vec_t<ipa_param_descriptor_t> *descriptors;
36 static inline int ipa_get_param_count (struct ipa_node_params *info) {
37 return ((info->descriptors) ? (info->descriptors)->length () : 0);
39 static inline tree ipa_get_param (struct ipa_node_params *info, int i) {
40 return ((*(info->descriptors))[i]).decl;
42 static inline void ipa_set_param_used (struct ipa_node_params *info, int i, bool val) {
43 ((*(info->descriptors))[i]).used = val;
45 int ipa_get_param_decl_index (struct ipa_node_params *info, tree ptree)
48 count = ipa_get_param_count (info);
49 for (i = 0; i < count; i++)
50 if (ipa_get_param (info, i) == ptree) return i;
53 bool visit_ref_for_mod_analysis (gimple stmt __attribute__ ((__unused__)),
56 struct ipa_node_params *info = (struct ipa_node_params *) data;
57 if (op && ((enum tree_code) (op)->base.code) == PARM_DECL)
59 int index = ipa_get_param_decl_index (info, op);
60 ((void)(__builtin_expect(!(index >= 0), 0) ? __builtin_unreachable(), 0 : 0));
61 ipa_set_param_used (info, index, true);
63 } // { dg-warning "control reaches end of non-void function" }