diff options
Diffstat (limited to 'gcc/tree-cfg.cc')
-rw-r--r-- | gcc/tree-cfg.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 275fc43..c388344 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -1095,10 +1095,14 @@ struct discrim_entry location_t assign_discriminator (location_t loc, unsigned int bb_id, - hash_map<int_hash <int64_t, -1, -2>, discrim_entry> &map) + hash_map<int_hash <unsigned, -1U, -2U>, + discrim_entry> &map) { bool existed; - discrim_entry &e = map.get_or_insert (LOCATION_LINE (loc), &existed); + if ((unsigned) LOCATION_LINE (loc) >= -2U) + return loc; + discrim_entry &e + = map.get_or_insert ((unsigned) LOCATION_LINE (loc), &existed); gcc_checking_assert (!has_discriminator (loc)); if (!existed) { @@ -1121,7 +1125,7 @@ assign_discriminator (location_t loc, unsigned int bb_id, static void assign_discriminators (void) { - hash_map<int_hash <int64_t, -1, -2>, discrim_entry> map (13); + hash_map<int_hash <unsigned, -1U, -2U>, discrim_entry> map (13); unsigned int bb_id = 0; basic_block bb; FOR_EACH_BB_FN (bb, cfun) @@ -2473,7 +2477,7 @@ find_case_label_for_value (const gswitch *switch_stmt, tree val) if (CASE_HIGH (t) == NULL) { - /* A singe-valued case label. */ + /* A single-valued case label. */ if (cmp == 0) return t; } @@ -8180,7 +8184,7 @@ dump_default_def (FILE *file, tree def, int spc, dump_flags_t flags) static void print_no_sanitize_attr_value (FILE *file, tree value) { - unsigned int flags = tree_to_uhwi (value); + sanitize_code_type flags = tree_to_sanitize_code_type (value); bool first = true; for (int i = 0; sanitizer_opts[i].name != NULL; ++i) { |