From fbc848cc8cfbbaa3fb117114f9d7692794e98748 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 10 Mar 2005 15:36:42 +0000 Subject: [PATCH] value-prof.c (rtl_find_values_to_profile): Use gcc_assert and gcc_unreachable. * value-prof.c (rtl_find_values_to_profile): Use gcc_assert and gcc_unreachable. (rtl_register_value_prof_hooks, tree_value_profile_transformations, tree_register_value_prof_hooks): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, variable_htab_free, variable_union, dataflow_set_different_2, count_uses, variable_was_changed, set_frame_base_location, set_variable_part, emit_note_insn_var_location, vt_emit_notes, vt_add_function_parameters): Likewise. * varasm.c (named_section_real, named_section, make_decl_rtl, asm_emit_uninitialised, assemble_integer, decode_addr_const, const_hash_1, compare_constant, copy_constant, force_const_mem, output_constant_pool_2, output_constant_pool_1, output_constant, output_constructor, make_decl_one_only, decl_tls_model, default_no_named_section, default_elf_select_section_1, default_unique_section_1): Likewise. * vec.c (vec_gc_o_reserve, vec_heap_o_reserve): Likewise. * vmsdbgout.c (addr_const_to_string): Likewise. From-SVN: r96241 --- gcc/ChangeLog | 20 +++++ gcc/value-prof.c | 12 ++- gcc/var-tracking.c | 94 ++++++------------------ gcc/varasm.c | 210 +++++++++++++++++++++++++---------------------------- gcc/vec.c | 6 +- gcc/vmsdbgout.c | 2 +- 6 files changed, 151 insertions(+), 193 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6a7c4e..f2a5c62 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,25 @@ 2005-03-10 Nathan Sidwell + * value-prof.c (rtl_find_values_to_profile): Use gcc_assert and + gcc_unreachable. + (rtl_register_value_prof_hooks, + tree_value_profile_transformations, + tree_register_value_prof_hooks): Likewise. + * var-tracking.c (stack_adjust_offset_pre_post, + variable_htab_free, variable_union, dataflow_set_different_2, + count_uses, variable_was_changed, set_frame_base_location, + set_variable_part, emit_note_insn_var_location, vt_emit_notes, + vt_add_function_parameters): Likewise. + * varasm.c (named_section_real, named_section, make_decl_rtl, + asm_emit_uninitialised, assemble_integer, decode_addr_const, + const_hash_1, compare_constant, copy_constant, force_const_mem, + output_constant_pool_2, output_constant_pool_1, output_constant, + output_constructor, make_decl_one_only, decl_tls_model, + default_no_named_section, default_elf_select_section_1, + default_unique_section_1): Likewise. + * vec.c (vec_gc_o_reserve, vec_heap_o_reserve): Likewise. + * vmsdbgout.c (addr_const_to_string): Likewise. + PR c++/20375 * function.c (struct assign_parm_data_one): Remove last_named field. diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 7c1f7e1..c563234 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -360,7 +360,7 @@ rtl_find_values_to_profile (histogram_values *values) break; default: - abort (); + gcc_unreachable (); } } allocate_reg_info (max_reg_num (), FALSE, FALSE); @@ -1032,21 +1032,20 @@ void rtl_register_value_prof_hooks (void) { value_prof_hooks = &rtl_value_prof_hooks; - if (ir_type ()) - abort (); + gcc_assert (!ir_type ()); } /* Tree-based versions are stubs for now. */ static void tree_find_values_to_profile (histogram_values *values ATTRIBUTE_UNUSED) { - abort (); + gcc_unreachable (); } static bool tree_value_profile_transformations (void) { - abort (); + gcc_unreachable (); } static struct value_prof_hooks tree_value_prof_hooks = { @@ -1058,8 +1057,7 @@ void tree_register_value_prof_hooks (void) { value_prof_hooks = &tree_value_prof_hooks; - if (!ir_type ()) - abort (); + gcc_assert (ir_type ()); } /* IR-independent entry points. */ diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 7621313..a6a9c15 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -387,9 +387,9 @@ stack_adjust_offset_pre_post (rtx pattern, HOST_WIDE_INT *pre, { rtx val = XEXP (XEXP (src, 1), 1); /* We handle only adjustments by constant amount. */ - if (GET_CODE (XEXP (src, 1)) != PLUS || - GET_CODE (val) != CONST_INT) - abort (); + gcc_assert (GET_CODE (XEXP (src, 1)) == PLUS && + GET_CODE (val) == CONST_INT); + if (code == PRE_MODIFY) *pre -= INTVAL (val); else @@ -639,10 +639,7 @@ variable_htab_free (void *elem) variable var = (variable) elem; location_chain node, next; -#ifdef ENABLE_CHECKING - if (var->refcount <= 0) - abort (); -#endif + gcc_assert (var->refcount > 0); var->refcount--; if (var->refcount > 0) @@ -1019,22 +1016,14 @@ variable_union (void **slot, void *data) a copy of the variable. */ for (k = 0; k < src->n_var_parts; k++) { + gcc_assert (!src->var_part[k].loc_chain + == !src->var_part[k].cur_loc); if (src->var_part[k].loc_chain) { -#ifdef ENABLE_CHECKING - if (src->var_part[k].cur_loc == NULL) - abort (); -#endif + gcc_assert (src->var_part[k].cur_loc); if (src->var_part[k].cur_loc != src->var_part[k].loc_chain->loc) break; } -#ifdef ENABLE_CHECKING - else - { - if (src->var_part[k].cur_loc != NULL) - abort (); - } -#endif } if (k < src->n_var_parts) unshare_variable (set, src); @@ -1047,10 +1036,7 @@ variable_union (void **slot, void *data) else dst = *dstp; -#ifdef ENABLE_CHECKING - if (src->n_var_parts == 0) - abort (); -#endif + gcc_assert (src->n_var_parts); /* Count the number of location parts, result is K. */ for (i = 0, j = 0, k = 0; @@ -1068,12 +1054,10 @@ variable_union (void **slot, void *data) } k += src->n_var_parts - i; k += dst->n_var_parts - j; -#ifdef ENABLE_CHECKING + /* We track only variables whose size is <= MAX_VAR_PARTS bytes thus there are at most MAX_VAR_PARTS different offsets. */ - if (k > MAX_VAR_PARTS) - abort (); -#endif + gcc_assert (k <= MAX_VAR_PARTS); if (dst->refcount > 1 && dst->n_var_parts != k) dst = unshare_variable (set, dst); @@ -1356,12 +1340,9 @@ dataflow_set_different_2 (void **slot, void *data) return 0; } -#ifdef ENABLE_CHECKING /* If both variables are defined they have been already checked for equivalence. */ - if (variable_different_p (var1, var2, false)) - abort (); -#endif + gcc_assert (!variable_different_p (var1, var2, false)); /* Continue traversing the hash table. */ return 1; @@ -1517,17 +1498,14 @@ count_uses (rtx *loc, void *insn) if (REG_P (*loc)) { -#ifdef ENABLE_CHECKING - if (REGNO (*loc) >= FIRST_PSEUDO_REGISTER) - abort (); -#endif - VTI (bb)->n_mos++; + gcc_assert (REGNO (*loc) < FIRST_PSEUDO_REGISTER); + VTI (bb)->n_mos++; } else if (MEM_P (*loc) && MEM_EXPR (*loc) && track_expr_p (MEM_EXPR (*loc))) { - VTI (bb)->n_mos++; + VTI (bb)->n_mos++; } return 0; @@ -1922,10 +1900,7 @@ variable_was_changed (variable var, htab_t htab) } else { -#ifdef ENABLE_CHECKING - if (!htab) - abort (); -#endif + gcc_assert (htab); if (var->n_var_parts == 0) { void **slot = htab_find_slot_with_hash (htab, var->decl, hash, @@ -1947,16 +1922,10 @@ set_frame_base_location (dataflow_set *set, rtx loc) var = htab_find_with_hash (set->vars, frame_base_decl, VARIABLE_HASH_VAL (frame_base_decl)); -#ifdef ENABLE_CHECKING - if (!var) - abort (); - if (var->n_var_parts != 1) - abort (); - if (var->var_part[0].offset != 0) - abort (); - if (!var->var_part[0].loc_chain) - abort (); -#endif + gcc_assert (var); + gcc_assert (var->n_var_parts == 1); + gcc_assert (!var->var_part[0].offset); + gcc_assert (var->var_part[0].loc_chain); /* If frame_base_decl is shared unshare it first. */ if (var->refcount > 1) @@ -2040,12 +2009,9 @@ set_variable_part (dataflow_set *set, rtx loc, tree decl, HOST_WIDE_INT offset) if (var->refcount > 1) var = unshare_variable (set, var); -#ifdef ENABLE_CHECKING /* We track only variables whose size is <= MAX_VAR_PARTS bytes thus there are at most MAX_VAR_PARTS different offsets. */ - if (var->n_var_parts >= MAX_VAR_PARTS) - abort (); -#endif + gcc_assert (var->n_var_parts < MAX_VAR_PARTS); /* We have to move the elements of array starting at index low to the next position. */ @@ -2207,10 +2173,7 @@ emit_note_insn_var_location (void **varp, void *data) HOST_WIDE_INT last_limit; tree type_size_unit; -#ifdef ENABLE_CHECKING - if (!var->decl) - abort (); -#endif + gcc_assert (var->decl); complete = true; last_limit = 0; @@ -2447,10 +2410,7 @@ vt_emit_notes (void) dataflow_set *last_out; dataflow_set empty; -#ifdef ENABLE_CHECKING - if (htab_elements (changed_variables)) - abort (); -#endif + gcc_assert (!htab_elements (changed_variables)); /* Enable emitting notes by functions (mainly by set_variable_part and delete_variable_part). */ @@ -2536,20 +2496,14 @@ vt_add_function_parameters (void) if (!decl) continue; -#ifdef ENABLE_CHECKING - if (parm != decl) - abort (); -#endif + gcc_assert (parm == decl); incoming = eliminate_regs (incoming, 0, NULL_RTX); out = &VTI (ENTRY_BLOCK_PTR)->out; if (REG_P (incoming)) { -#ifdef ENABLE_CHECKING - if (REGNO (incoming) >= FIRST_PSEUDO_REGISTER) - abort (); -#endif + gcc_assert (REGNO (incoming) < FIRST_PSEUDO_REGISTER); attrs_list_insert (&out->regs[REGNO (incoming)], parm, offset, incoming); set_variable_part (out, incoming, parm, offset); diff --git a/gcc/varasm.c b/gcc/varasm.c index 0a667fe..e226a19 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -423,8 +423,9 @@ named_section_real (const char *name, unsigned int flags, tree decl) { if (in_section != in_named || strcmp (name, in_named_name) != 0) { - if (! set_named_section_flags (name, flags)) - abort (); + bool unchanged = set_named_section_flags (name, flags); + + gcc_assert (unchanged); targetm.asm_out.named_section (name, flags, decl); @@ -448,8 +449,7 @@ named_section (tree decl, const char *name, int reloc) { unsigned int flags; - if (decl != NULL_TREE && !DECL_P (decl)) - abort (); + gcc_assert (!decl || DECL_P (decl)); if (name == NULL) name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); @@ -852,19 +852,19 @@ make_decl_rtl (tree decl) rtx x; /* Check that we are not being given an automatic variable. */ + gcc_assert (TREE_CODE (decl) != PARM_DECL + && TREE_CODE (decl) != RESULT_DECL); + /* A weak alias has TREE_PUBLIC set but not the other bits. */ - if (TREE_CODE (decl) == PARM_DECL - || TREE_CODE (decl) == RESULT_DECL - || (TREE_CODE (decl) == VAR_DECL - && !TREE_STATIC (decl) - && !TREE_PUBLIC (decl) - && !DECL_EXTERNAL (decl) - && !DECL_REGISTER (decl))) - abort (); + gcc_assert (TREE_CODE (decl) != VAR_DECL + || TREE_STATIC (decl) + || TREE_PUBLIC (decl) + || DECL_EXTERNAL (decl) + || DECL_REGISTER (decl)); + /* And that we were not given a type or a label. */ - else if (TREE_CODE (decl) == TYPE_DECL - || TREE_CODE (decl) == LABEL_DECL) - abort (); + gcc_assert (TREE_CODE (decl) != TYPE_DECL + && TREE_CODE (decl) != LABEL_DECL); /* For a duplicate declaration, we can be called twice on the same DECL node. Don't discard the RTL already made. */ @@ -1003,8 +1003,7 @@ make_decl_rtl (tree decl) void make_var_volatile (tree var) { - if (!MEM_P (DECL_RTL (var))) - abort (); + gcc_assert (MEM_P (DECL_RTL (var))); MEM_VOLATILE_P (DECL_RTL (var)) = 1; } @@ -1487,7 +1486,7 @@ asm_emit_uninitialised (tree decl, const char *name, ASM_EMIT_LOCAL (decl, name, size, rounded); break; default: - abort (); + gcc_unreachable (); } return true; @@ -2122,13 +2121,11 @@ assemble_integer (rtx x, unsigned int size, unsigned int align, int force) /* If we've printed some of it, but not all of it, there's no going back now. */ - if (i > 0) - abort (); + gcc_assert (!i); } - if (force) - abort (); - + gcc_assert (!force); + return false; } @@ -2231,11 +2228,10 @@ decode_addr_const (tree exp, struct addr_const *value) break; default: - abort (); + gcc_unreachable (); } - if (!MEM_P (x)) - abort (); + gcc_assert (MEM_P (x)); x = XEXP (x, 0); value->base = x; @@ -2318,19 +2314,24 @@ const_hash_1 (const tree exp) struct addr_const value; decode_addr_const (exp, &value); - if (GET_CODE (value.base) == SYMBOL_REF) + switch (GET_CODE (value.base)) { + case SYMBOL_REF: /* Don't hash the address of the SYMBOL_REF; only use the offset and the symbol name. */ hi = value.offset; p = XSTR (value.base, 0); for (i = 0; p[i] != 0; i++) hi = ((hi * 613) + (unsigned) (p[i])); + break; + + case LABEL_REF: + hi = value.offset + CODE_LABEL_NUMBER (XEXP (value.base, 0)) * 13; + break; + + default: + gcc_unreachable (); } - else if (GET_CODE (value.base) == LABEL_REF) - hi = value.offset + CODE_LABEL_NUMBER (XEXP (value.base, 0)) * 13; - else - abort (); } return hi; @@ -2492,8 +2493,7 @@ compare_constant (const tree t1, const tree t2) } } - /* Should not get here. */ - abort (); + gcc_unreachable (); } /* Make a copy of the whole tree structure for a constant. This @@ -2551,12 +2551,10 @@ copy_constant (tree exp) default: { - tree t; - t = lang_hooks.expand_constant (exp); - if (t != exp) - return copy_constant (t); - else - abort (); + tree t = lang_hooks.expand_constant (exp); + + gcc_assert (t == exp); + return copy_constant (t); } } } @@ -3018,8 +3016,7 @@ force_const_mem (enum machine_mode mode, rtx x) /* Insert the descriptor into the symbol cross-reference table too. */ slot = htab_find_slot (pool->const_rtx_sym_htab, desc, INSERT); - if (*slot) - abort (); + gcc_assert (!*slot); *slot = desc; /* Construct the MEM. */ @@ -3100,16 +3097,15 @@ output_constant_pool_2 (enum machine_mode mode, rtx x, unsigned int align) switch (GET_MODE_CLASS (mode)) { case MODE_FLOAT: - if (GET_CODE (x) != CONST_DOUBLE) - abort (); - else - { - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - assemble_real (r, mode, align); - } - break; - + { + REAL_VALUE_TYPE r; + + gcc_assert (GET_CODE (x) == CONST_DOUBLE); + REAL_VALUE_FROM_CONST_DOUBLE (r, x); + assemble_real (r, mode, align); + break; + } + case MODE_INT: case MODE_PARTIAL_INT: assemble_integer (x, GET_MODE_SIZE (mode), align, 1); @@ -3122,8 +3118,7 @@ output_constant_pool_2 (enum machine_mode mode, rtx x, unsigned int align) enum machine_mode submode = GET_MODE_INNER (mode); unsigned int subalign = MIN (align, GET_MODE_BITSIZE (submode)); - if (GET_CODE (x) != CONST_VECTOR) - abort (); + gcc_assert (GET_CODE (x) == CONST_VECTOR); units = CONST_VECTOR_NUNITS (x); for (i = 0; i < units; i++) @@ -3135,7 +3130,7 @@ output_constant_pool_2 (enum machine_mode mode, rtx x, unsigned int align) break; default: - abort (); + gcc_unreachable (); } } @@ -3171,13 +3166,9 @@ output_constant_pool_1 (struct constant_descriptor_rtx *desc) case LABEL_REF: tmp = XEXP (x, 0); - if (INSN_DELETED_P (tmp) - || (NOTE_P (tmp) - && NOTE_LINE_NUMBER (tmp) == NOTE_INSN_DELETED)) - { - abort (); - x = const0_rtx; - } + gcc_assert (!INSN_DELETED_P (tmp)); + gcc_assert (!NOTE_P (tmp) + || NOTE_LINE_NUMBER (tmp) != NOTE_INSN_DELETED); break; default: @@ -3743,7 +3734,7 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) tree decl = TREE_OPERAND (exp, 0); ASM_OUTPUT_FDESC (asm_out_file, decl, part); #else - abort (); + gcc_unreachable (); #endif return; } @@ -3780,51 +3771,51 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) case ARRAY_TYPE: case VECTOR_TYPE: - if (TREE_CODE (exp) == CONSTRUCTOR) + switch (TREE_CODE (exp)) { + case CONSTRUCTOR: output_constructor (exp, size, align); return; - } - else if (TREE_CODE (exp) == STRING_CST) - { + case STRING_CST: thissize = MIN ((unsigned HOST_WIDE_INT)TREE_STRING_LENGTH (exp), size); assemble_string (TREE_STRING_POINTER (exp), thissize); - } - else if (TREE_CODE (exp) == VECTOR_CST) - { - int elt_size; - tree link; - unsigned int nalign; - enum machine_mode inner; - - inner = TYPE_MODE (TREE_TYPE (TREE_TYPE (exp))); - nalign = MIN (align, GET_MODE_ALIGNMENT (inner)); - - elt_size = GET_MODE_SIZE (inner); + break; - link = TREE_VECTOR_CST_ELTS (exp); - output_constant (TREE_VALUE (link), elt_size, align); - while ((link = TREE_CHAIN (link)) != NULL) - output_constant (TREE_VALUE (link), elt_size, nalign); + case VECTOR_CST: + { + int elt_size; + tree link; + unsigned int nalign; + enum machine_mode inner; + + inner = TYPE_MODE (TREE_TYPE (TREE_TYPE (exp))); + nalign = MIN (align, GET_MODE_ALIGNMENT (inner)); + + elt_size = GET_MODE_SIZE (inner); + + link = TREE_VECTOR_CST_ELTS (exp); + output_constant (TREE_VALUE (link), elt_size, align); + while ((link = TREE_CHAIN (link)) != NULL) + output_constant (TREE_VALUE (link), elt_size, nalign); + break; + } + default: + gcc_unreachable (); } - else - abort (); break; case RECORD_TYPE: case UNION_TYPE: - if (TREE_CODE (exp) == CONSTRUCTOR) - output_constructor (exp, size, align); - else - abort (); + gcc_assert (TREE_CODE (exp) == CONSTRUCTOR); + output_constructor (exp, size, align); return; case ERROR_MARK: return; default: - abort (); + gcc_unreachable (); } if (size > thissize) @@ -3890,8 +3881,7 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, int byte_buffer_in_use = 0; int byte = 0; - if (HOST_BITS_PER_WIDE_INT < BITS_PER_UNIT) - abort (); + gcc_assert (HOST_BITS_PER_WIDE_INT >= BITS_PER_UNIT); if (TREE_CODE (type) == RECORD_TYPE) field = TYPE_FIELDS (type); @@ -4012,8 +4002,7 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, fieldsize = array_size_for_constructor (val); /* Given a non-empty initialization, this field had better be last. */ - if (fieldsize != 0 && TREE_CHAIN (field) != NULL_TREE) - abort (); + gcc_assert (!fieldsize || !TREE_CHAIN (field)); } else if (DECL_SIZE_UNIT (field)) { @@ -4122,13 +4111,12 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, /* Now get the bits from the appropriate constant word. */ if (shift < HOST_BITS_PER_WIDE_INT) value = TREE_INT_CST_LOW (val); - else if (shift < 2 * HOST_BITS_PER_WIDE_INT) + else { + gcc_assert (shift < 2 * HOST_BITS_PER_WIDE_INT); value = TREE_INT_CST_HIGH (val); shift -= HOST_BITS_PER_WIDE_INT; } - else - abort (); /* Get the result. This works only when: 1 <= this_time <= HOST_BITS_PER_WIDE_INT. */ @@ -4155,13 +4143,12 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, /* Now get the bits from the appropriate constant word. */ if (shift < HOST_BITS_PER_WIDE_INT) value = TREE_INT_CST_LOW (val); - else if (shift < 2 * HOST_BITS_PER_WIDE_INT) + else { + gcc_assert (shift < 2 * HOST_BITS_PER_WIDE_INT); value = TREE_INT_CST_HIGH (val); shift -= HOST_BITS_PER_WIDE_INT; } - else - abort (); /* Get the result. This works only when: 1 <= this_time <= HOST_BITS_PER_WIDE_INT. */ @@ -4556,8 +4543,8 @@ supports_one_only (void) void make_decl_one_only (tree decl) { - if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL) - abort (); + gcc_assert (TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL); TREE_PUBLIC (decl) = 1; @@ -4571,10 +4558,11 @@ make_decl_one_only (tree decl) else if (TREE_CODE (decl) == VAR_DECL && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)) DECL_COMMON (decl) = 1; - else if (SUPPORTS_WEAK) - DECL_WEAK (decl) = 1; else - abort (); + { + gcc_assert (SUPPORTS_WEAK); + DECL_WEAK (decl) = 1; + } } void @@ -4598,8 +4586,8 @@ decl_tls_model (tree decl) if (attr) { attr = TREE_VALUE (TREE_VALUE (attr)); - if (TREE_CODE (attr) != STRING_CST) - abort (); + gcc_assert (TREE_CODE (attr) == STRING_CST); + if (!strcmp (TREE_STRING_POINTER (attr), "local-exec")) kind = TLS_MODEL_LOCAL_EXEC; else if (!strcmp (TREE_STRING_POINTER (attr), "initial-exec")) @@ -4609,7 +4597,7 @@ decl_tls_model (tree decl) else if (!strcmp (TREE_STRING_POINTER (attr), "global-dynamic")) kind = TLS_MODEL_GLOBAL_DYNAMIC; else - abort (); + gcc_unreachable (); return kind; } @@ -4710,7 +4698,7 @@ default_no_named_section (const char *name ATTRIBUTE_UNUSED, { /* Some object formats don't support named sections at all. The front-end should already have flagged this as an error. */ - abort (); + gcc_unreachable (); } void @@ -5011,7 +4999,7 @@ default_elf_select_section_1 (tree decl, int reloc, { case SECCAT_TEXT: /* We're not supposed to be called on FUNCTION_DECLs. */ - abort (); + gcc_unreachable (); case SECCAT_RODATA: readonly_data_section (); return; @@ -5063,7 +5051,7 @@ default_elf_select_section_1 (tree decl, int reloc, sname = ".tbss"; break; default: - abort (); + gcc_unreachable (); } if (!DECL_P (decl)) @@ -5125,7 +5113,7 @@ default_unique_section_1 (tree decl, int reloc, int shlib) prefix = one_only ? ".gnu.linkonce.tb." : ".tbss."; break; default: - abort (); + gcc_unreachable (); } plen = strlen (prefix); diff --git a/gcc/vec.c b/gcc/vec.c index 72480dc..65a482e 100644 --- a/gcc/vec.c +++ b/gcc/vec.c @@ -66,8 +66,7 @@ vec_gc_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size else alloc = 4; - if (pfx && pfx->alloc >= alloc) - abort (); + gcc_assert (!pfx || pfx->alloc < alloc); vec = ggc_realloc_stat (vec, vec_offset + alloc * elt_size PASS_MEM_STAT); ((struct vec_prefix *)vec)->alloc = alloc; @@ -117,8 +116,7 @@ vec_heap_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size else alloc = 4; - if (pfx && pfx->alloc >= alloc) - abort (); + gcc_assert (!pfx || pfx->alloc < alloc); vec = xrealloc (vec, vec_offset + alloc * elt_size); ((struct vec_prefix *)vec)->alloc = alloc; diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c index 060abe8..ae19b93 100644 --- a/gcc/vmsdbgout.c +++ b/gcc/vmsdbgout.c @@ -427,7 +427,7 @@ addr_const_to_string (char *str, rtx x) char buf1[256]; char buf2[256]; -restart: + restart: str[0] = '\0'; switch (GET_CODE (x)) { -- 2.7.4