Commit ced3f397 by Nathan Sidwell

dbxout.c (dbxout_type, [...]): Use gcc_assert and gcc_unreachable.

	* dbxout.c (dbxout_type, dbxout_type_name, dbxout_symbol): Use
	gcc_assert and gcc_unreachable.
	* ddg.c (create_ddg_dependence, add_deps_for_def,
	add_deps_for_use, create_ddg, add_edge_to_ddg): Likewise.
	* df.c (df_ref_unlink, df_ref_record, df_uses_record,
	df_reg_def_chain_create, df_reg_use_chain_create, df_analyze,
	df_insn_delete, df_refs_reg_replace, df_ref_reg_replace,
	df_insns_modify, df_pattern_emit_before, df_bb_reg_live_start_p,
	df_bb_reg_live_end_p, df_bb_regs_lives_compare,
	df_bb_single_def_use_insn_find, dataflow_set_a_op_b,
	dataflow_set_copy, hybrid_search, diagnostic.c,
	diagnostic_build_prefix, diagnostic_count_diagnostic): Likewise.
	* dojump.c (do_jump): Likewise.
	* dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree,
	compute_dom_fast_query, calculate_dominance_info,
	free_dominance_info, get_immediate_dominator,
	set_immediate_dominator, get_dominated_by,
	redirect_immediate_dominators, nearest_common_dominator,
	dominated_by_p, verify_dominators, recount_dominator,
	iterate_fix_dominators, add_to_dominance_info,
	delete_from_dominance_info): Likewise.
	* dwarf2asm.c (size_of_encoded_value, eh_data_format_name,
	dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
	dw2_force_const_mem, dw2_asm_output_encoded_addr_rtx): Likewise.
	* dwarf2out.c (expand_builtin_init_dwarf_reg_sizes, reg_save,
	initial_return_save, stack_adjust_offset, dwarf2out_stack_adjust,
	flush_queued_reg_saves, dwarf2out_frame_debug_expr,
	dwarf2out_frame_debug, dw_cfi_oprnd1_desc, output_cfi,
	output_call_frame_info, output_loc_operands, build_cfa_loc,
	decl_ultimate_origin, AT_flag, AT_int, AT_unsigned, AT_string,
	AT_string_form, add_AT_specification, AT_ref, set_AT_ref_external,
	AT_loc, AT_loc_list, AT_addr, AT_lbl, add_child_die,
	splice_child_die, attr_checksum, same_dw_val_p,
	break_out_includes, build_abbrev_table, size_of_die, mark_dies,
	unmark_dies, value_format, output_loc_list, output_die,
	output_pubnames, output_aranges, base_type_die, is_base_type,
	modified_type_die, dbx_reg_number, multiple_reg_loc_descriptor,
	mem_loc_descriptor, loc_descriptor, loc_descriptor_from_tree_1,
	field_byte_offset, add_data_member_location_attribute,
	add_const_value_attribute, rtl_for_decl_location,
	add_location_or_const_value_attribute, add_byte_size_attribute,
	add_bit_offset_attribute, add_bit_size_attribute,
	add_abstract_origin_attribute, pop_decl_scope, scope_die_for,
	decl_start_label, gen_formal_parameter_die,
	gen_type_die_for_member, gen_subprogram_die, gen_label_die,
	gen_typedef_die, gen_type_die, gen_tagged_type_instantiation_die,
	force_decl_die, force_type_die, gen_decl_die,
	dwarf2out_imported_module_or_decl, prune_unused_types_prune,
	dwarf2out_finish): Likewise.

From-SVN: r87176
parent faaaf610
2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
* dbxout.c (dbxout_type, dbxout_type_name, dbxout_symbol): Use
gcc_assert and gcc_unreachable.
* ddg.c (create_ddg_dependence, add_deps_for_def,
add_deps_for_use, create_ddg, add_edge_to_ddg): Likewise.
* df.c (df_ref_unlink, df_ref_record, df_uses_record,
df_reg_def_chain_create, df_reg_use_chain_create, df_analyze,
df_insn_delete, df_refs_reg_replace, df_ref_reg_replace,
df_insns_modify, df_pattern_emit_before, df_bb_reg_live_start_p,
df_bb_reg_live_end_p, df_bb_regs_lives_compare,
df_bb_single_def_use_insn_find, dataflow_set_a_op_b,
dataflow_set_copy, hybrid_search, diagnostic.c,
diagnostic_build_prefix, diagnostic_count_diagnostic): Likewise.
* dojump.c (do_jump): Likewise.
* dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree,
compute_dom_fast_query, calculate_dominance_info,
free_dominance_info, get_immediate_dominator,
set_immediate_dominator, get_dominated_by,
redirect_immediate_dominators, nearest_common_dominator,
dominated_by_p, verify_dominators, recount_dominator,
iterate_fix_dominators, add_to_dominance_info,
delete_from_dominance_info): Likewise.
* dwarf2asm.c (size_of_encoded_value, eh_data_format_name,
dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
dw2_force_const_mem, dw2_asm_output_encoded_addr_rtx): Likewise.
* dwarf2out.c (expand_builtin_init_dwarf_reg_sizes, reg_save,
initial_return_save, stack_adjust_offset, dwarf2out_stack_adjust,
flush_queued_reg_saves, dwarf2out_frame_debug_expr,
dwarf2out_frame_debug, dw_cfi_oprnd1_desc, output_cfi,
output_call_frame_info, output_loc_operands, build_cfa_loc,
decl_ultimate_origin, AT_flag, AT_int, AT_unsigned, AT_string,
AT_string_form, add_AT_specification, AT_ref, set_AT_ref_external,
AT_loc, AT_loc_list, AT_addr, AT_lbl, add_child_die,
splice_child_die, attr_checksum, same_dw_val_p,
break_out_includes, build_abbrev_table, size_of_die, mark_dies,
unmark_dies, value_format, output_loc_list, output_die,
output_pubnames, output_aranges, base_type_die, is_base_type,
modified_type_die, dbx_reg_number, multiple_reg_loc_descriptor,
mem_loc_descriptor, loc_descriptor, loc_descriptor_from_tree_1,
field_byte_offset, add_data_member_location_attribute,
add_const_value_attribute, rtl_for_decl_location,
add_location_or_const_value_attribute, add_byte_size_attribute,
add_bit_offset_attribute, add_bit_size_attribute,
add_abstract_origin_attribute, pop_decl_scope, scope_die_for,
decl_start_label, gen_formal_parameter_die,
gen_type_die_for_member, gen_subprogram_die, gen_label_die,
gen_typedef_die, gen_type_die, gen_tagged_type_instantiation_die,
force_decl_die, force_type_die, gen_decl_die,
dwarf2out_imported_module_or_decl, prune_unused_types_prune,
dwarf2out_finish): Likewise.
2004-09-08 Andreas Tobler <toa@pop.agri.ch> 2004-09-08 Andreas Tobler <toa@pop.agri.ch>
* Makefile.in (builtins.o): Depend on tree-mudflap.h. * Makefile.in (builtins.o): Depend on tree-mudflap.h.
...@@ -6014,7 +6066,7 @@ ...@@ -6014,7 +6066,7 @@
* config/i386/xmmintrin.h: Include <mm_malloc.h>. * config/i386/xmmintrin.h: Include <mm_malloc.h>.
2004-08-03 H.J. Lu <hongjiu.lu@intel.com> 2004-08-03 H.J. Lu <hongjiu.lu@intel.com>
Tanguy Fautr <tfautre@pandora.be> Tanguy Fautrà <tfautre@pandora.be>
* config/i386/pmm_malloc.h: New file. * config/i386/pmm_malloc.h: New file.
......
...@@ -1683,8 +1683,7 @@ dbxout_type (tree type, int full) ...@@ -1683,8 +1683,7 @@ dbxout_type (tree type, int full)
/* We shouldn't be outputting a reference to a type before its /* We shouldn't be outputting a reference to a type before its
definition unless the type has a tag name. definition unless the type has a tag name.
A typedef name without a tag name should be impossible. */ A typedef name without a tag name should be impossible. */
if (TREE_CODE (TYPE_NAME (type)) != IDENTIFIER_NODE) gcc_assert (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE);
abort ();
#endif #endif
if (TYPE_NAME (type) != 0) if (TYPE_NAME (type) != 0)
dbxout_type_name (type); dbxout_type_name (type);
...@@ -1919,7 +1918,7 @@ dbxout_type (tree type, int full) ...@@ -1919,7 +1918,7 @@ dbxout_type (tree type, int full)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -2040,19 +2039,19 @@ print_wide_int (HOST_WIDE_INT c) ...@@ -2040,19 +2039,19 @@ print_wide_int (HOST_WIDE_INT c)
static void static void
dbxout_type_name (tree type) dbxout_type_name (tree type)
{ {
tree t; tree t = TYPE_NAME (type);
if (TYPE_NAME (type) == 0)
abort (); gcc_assert (t);
if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) switch (TREE_CODE (t))
{
t = TYPE_NAME (type);
}
else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
{ {
t = DECL_NAME (TYPE_NAME (type)); case IDENTIFIER_NODE:
break;
case TYPE_DECL:
t = DECL_NAME (t);
break;
default:
gcc_unreachable ();
} }
else
abort ();
fprintf (asmfile, "%s", IDENTIFIER_POINTER (t)); fprintf (asmfile, "%s", IDENTIFIER_POINTER (t));
CHARS (IDENTIFIER_LENGTH (t)); CHARS (IDENTIFIER_LENGTH (t));
...@@ -2386,7 +2385,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) ...@@ -2386,7 +2385,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
case PARM_DECL: case PARM_DECL:
/* Parm decls go in their own separate chains /* Parm decls go in their own separate chains
and are output by dbxout_reg_parms and dbxout_parms. */ and are output by dbxout_reg_parms and dbxout_parms. */
abort (); gcc_unreachable ();
case RESULT_DECL: case RESULT_DECL:
/* Named return value, treat like a VAR_DECL. */ /* Named return value, treat like a VAR_DECL. */
......
...@@ -164,8 +164,7 @@ create_ddg_dependence (ddg_ptr g, ddg_node_ptr src_node, ...@@ -164,8 +164,7 @@ create_ddg_dependence (ddg_ptr g, ddg_node_ptr src_node,
if (interloop) if (interloop)
distance = 1; distance = 1;
if (!link) gcc_assert (link);
abort ();
/* Note: REG_DEP_ANTI applies to MEM ANTI_DEP as well!! */ /* Note: REG_DEP_ANTI applies to MEM ANTI_DEP as well!! */
if (REG_NOTE_KIND (link) == REG_DEP_ANTI) if (REG_NOTE_KIND (link) == REG_DEP_ANTI)
...@@ -240,8 +239,7 @@ add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd) ...@@ -240,8 +239,7 @@ add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd)
rtx use_insn = DF_REF_INSN (r_use->ref); rtx use_insn = DF_REF_INSN (r_use->ref);
ddg_node_ptr dest_node = get_node_of_insn (g, use_insn); ddg_node_ptr dest_node = get_node_of_insn (g, use_insn);
if (!src_node || !dest_node) gcc_assert (src_node && dest_node);
abort ();
/* Any such upwards exposed use appears before the rd def. */ /* Any such upwards exposed use appears before the rd def. */
use_before_def = true; use_before_def = true;
...@@ -296,8 +294,7 @@ add_deps_for_use (ddg_ptr g, struct df *df, struct ref *use) ...@@ -296,8 +294,7 @@ add_deps_for_use (ddg_ptr g, struct df *df, struct ref *use)
use_node = get_node_of_insn (g, use->insn); use_node = get_node_of_insn (g, use->insn);
def_node = get_node_of_insn (g, first_def->insn); def_node = get_node_of_insn (g, first_def->insn);
if (!use_node || !def_node) gcc_assert (use_node && def_node);
abort ();
/* Make sure there are no defs after USE. */ /* Make sure there are no defs after USE. */
for (i = use_node->cuid + 1; i < g->num_nodes; i++) for (i = use_node->cuid + 1; i < g->num_nodes; i++)
...@@ -484,10 +481,8 @@ create_ddg (basic_block bb, struct df *df, int closing_branch_deps) ...@@ -484,10 +481,8 @@ create_ddg (basic_block bb, struct df *df, int closing_branch_deps)
} }
if (JUMP_P (insn)) if (JUMP_P (insn))
{ {
if (g->closing_branch) gcc_assert (!g->closing_branch);
abort (); /* Found two branches in DDG. */ g->closing_branch = &g->nodes[i];
else
g->closing_branch = &g->nodes[i];
} }
else if (GET_CODE (PATTERN (insn)) == USE) else if (GET_CODE (PATTERN (insn)) == USE)
{ {
...@@ -505,9 +500,10 @@ create_ddg (basic_block bb, struct df *df, int closing_branch_deps) ...@@ -505,9 +500,10 @@ create_ddg (basic_block bb, struct df *df, int closing_branch_deps)
g->nodes[i++].insn = insn; g->nodes[i++].insn = insn;
first_note = NULL_RTX; first_note = NULL_RTX;
} }
if (!g->closing_branch) /* We must have found a branch in DDG. */
abort (); /* Found no branch in DDG. */ gcc_assert (g->closing_branch);
/* Build the data dependency graph. */ /* Build the data dependency graph. */
build_intra_loop_deps (g); build_intra_loop_deps (g);
...@@ -646,8 +642,8 @@ add_edge_to_ddg (ddg_ptr g ATTRIBUTE_UNUSED, ddg_edge_ptr e) ...@@ -646,8 +642,8 @@ add_edge_to_ddg (ddg_ptr g ATTRIBUTE_UNUSED, ddg_edge_ptr e)
ddg_node_ptr src = e->src; ddg_node_ptr src = e->src;
ddg_node_ptr dest = e->dest; ddg_node_ptr dest = e->dest;
if (!src->successors || !dest->predecessors) /* Should have allocated the sbitmaps. */
abort (); /* Should have allocated the sbitmaps. */ gcc_assert (src->successors && dest->predecessors);
SET_BIT (src->successors, dest->cuid); SET_BIT (src->successors, dest->cuid);
SET_BIT (dest->predecessors, src->cuid); SET_BIT (dest->predecessors, src->cuid);
......
...@@ -648,8 +648,8 @@ df_ref_unlink (struct df_link **phead, struct ref *ref) ...@@ -648,8 +648,8 @@ df_ref_unlink (struct df_link **phead, struct ref *ref)
/* Only a single ref. It must be the one we want. /* Only a single ref. It must be the one we want.
If not, the def-use and use-def chains are likely to If not, the def-use and use-def chains are likely to
be inconsistent. */ be inconsistent. */
if (link->ref != ref) gcc_assert (link->ref == ref);
abort ();
/* Now have an empty chain. */ /* Now have an empty chain. */
*phead = NULL; *phead = NULL;
} }
...@@ -808,8 +808,7 @@ df_ref_record (struct df *df, rtx reg, rtx *loc, rtx insn, ...@@ -808,8 +808,7 @@ df_ref_record (struct df *df, rtx reg, rtx *loc, rtx insn,
{ {
unsigned int regno; unsigned int regno;
if (!REG_P (reg) && GET_CODE (reg) != SUBREG) gcc_assert (REG_P (reg) || GET_CODE (reg) == SUBREG);
abort ();
/* For the reg allocator we are interested in some SUBREG rtx's, but not /* For the reg allocator we are interested in some SUBREG rtx's, but not
all. Notably only those representing a word extraction from a multi-word all. Notably only those representing a word extraction from a multi-word
...@@ -1040,10 +1039,10 @@ df_uses_record (struct df *df, rtx *loc, enum df_ref_type ref_type, ...@@ -1040,10 +1039,10 @@ df_uses_record (struct df *df, rtx *loc, enum df_ref_type ref_type,
bb, insn, 0); bb, insn, 0);
break; break;
case STRICT_LOW_PART: case STRICT_LOW_PART:
/* A strict_low_part uses the whole REG and not just the SUBREG. */ /* A strict_low_part uses the whole REG and not just the
SUBREG. */
dst = XEXP (dst, 0); dst = XEXP (dst, 0);
if (GET_CODE (dst) != SUBREG) gcc_assert (GET_CODE (dst) == SUBREG);
abort ();
df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb,
insn, DF_REF_READ_WRITE); insn, DF_REF_READ_WRITE);
break; break;
...@@ -1056,7 +1055,7 @@ df_uses_record (struct df *df, rtx *loc, enum df_ref_type ref_type, ...@@ -1056,7 +1055,7 @@ df_uses_record (struct df *df, rtx *loc, enum df_ref_type ref_type,
dst = XEXP (dst, 0); dst = XEXP (dst, 0);
break; break;
default: default:
abort (); gcc_unreachable ();
} }
return; return;
} }
...@@ -1311,8 +1310,7 @@ df_reg_def_chain_create (struct df *df, bitmap blocks, bool redo) ...@@ -1311,8 +1310,7 @@ df_reg_def_chain_create (struct df *df, bitmap blocks, bool redo)
{ {
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
for (regno = 0; regno < df->n_regs; regno++) for (regno = 0; regno < df->n_regs; regno++)
if (df->regs[regno].defs) gcc_assert (!df->regs[regno].defs);
abort ();
#endif #endif
/* Pretend that all defs are new. */ /* Pretend that all defs are new. */
...@@ -1393,8 +1391,7 @@ df_reg_use_chain_create (struct df *df, bitmap blocks, bool redo) ...@@ -1393,8 +1391,7 @@ df_reg_use_chain_create (struct df *df, bitmap blocks, bool redo)
{ {
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
for (regno = 0; regno < df->n_regs; regno++) for (regno = 0; regno < df->n_regs; regno++)
if (df->regs[regno].uses) gcc_assert (!df->regs[regno].uses);
abort ();
#endif #endif
/* Pretend that all uses are new. */ /* Pretend that all uses are new. */
...@@ -2298,8 +2295,7 @@ df_analyze (struct df *df, bitmap blocks, int flags) ...@@ -2298,8 +2295,7 @@ df_analyze (struct df *df, bitmap blocks, int flags)
/* We could deal with additional basic blocks being created by /* We could deal with additional basic blocks being created by
rescanning everything again. */ rescanning everything again. */
if (df->n_bbs && df->n_bbs != (unsigned int) last_basic_block) gcc_assert (!df->n_bbs || df->n_bbs == (unsigned int) last_basic_block);
abort ();
update = df_modified_p (df, blocks); update = df_modified_p (df, blocks);
if (update || (flags != df->flags)) if (update || (flags != df->flags))
...@@ -2321,8 +2317,7 @@ df_analyze (struct df *df, bitmap blocks, int flags) ...@@ -2321,8 +2317,7 @@ df_analyze (struct df *df, bitmap blocks, int flags)
if (blocks == (bitmap) -1) if (blocks == (bitmap) -1)
blocks = df->bbs_modified; blocks = df->bbs_modified;
if (! df->n_bbs) gcc_assert (df->n_bbs);
abort ();
df_analyze_1 (df, blocks, flags, 1); df_analyze_1 (df, blocks, flags, 1);
bitmap_zero (df->bbs_modified); bitmap_zero (df->bbs_modified);
...@@ -2631,8 +2626,7 @@ df_insn_delete (struct df *df, basic_block bb ATTRIBUTE_UNUSED, rtx insn) ...@@ -2631,8 +2626,7 @@ df_insn_delete (struct df *df, basic_block bb ATTRIBUTE_UNUSED, rtx insn)
handle the JUMP_LABEL? */ handle the JUMP_LABEL? */
/* We should not be deleting the NOTE_INSN_BASIC_BLOCK or label. */ /* We should not be deleting the NOTE_INSN_BASIC_BLOCK or label. */
if (insn == BB_HEAD (bb)) gcc_assert (insn != BB_HEAD (bb));
abort ();
/* Delete the insn. */ /* Delete the insn. */
delete_insn (insn); delete_insn (insn);
...@@ -2796,24 +2790,17 @@ df_refs_reg_replace (struct df *df, bitmap blocks, struct df_link *chain, rtx ol ...@@ -2796,24 +2790,17 @@ df_refs_reg_replace (struct df *df, bitmap blocks, struct df_link *chain, rtx ol
if (! INSN_P (insn)) if (! INSN_P (insn))
continue; continue;
if (bitmap_bit_p (blocks, DF_REF_BBNO (ref))) gcc_assert (bitmap_bit_p (blocks, DF_REF_BBNO (ref)));
{
df_ref_reg_replace (df, ref, oldreg, newreg); df_ref_reg_replace (df, ref, oldreg, newreg);
/* Replace occurrences of the reg within the REG_NOTES. */ /* Replace occurrences of the reg within the REG_NOTES. */
if ((! link->next || DF_REF_INSN (ref) if ((! link->next || DF_REF_INSN (ref)
!= DF_REF_INSN (link->next->ref)) != DF_REF_INSN (link->next->ref))
&& REG_NOTES (insn)) && REG_NOTES (insn))
{
args.insn = insn;
for_each_rtx (&REG_NOTES (insn), df_rtx_reg_replace, &args);
}
}
else
{ {
/* Temporary check to ensure that we have a grip on which args.insn = insn;
regs should be replaced. */ for_each_rtx (&REG_NOTES (insn), df_rtx_reg_replace, &args);
abort ();
} }
} }
} }
...@@ -2844,8 +2831,7 @@ df_ref_reg_replace (struct df *df, struct ref *ref, rtx oldreg, rtx newreg) ...@@ -2844,8 +2831,7 @@ df_ref_reg_replace (struct df *df, struct ref *ref, rtx oldreg, rtx newreg)
if (! INSN_P (DF_REF_INSN (ref))) if (! INSN_P (DF_REF_INSN (ref)))
return 0; return 0;
if (oldreg && oldreg != DF_REF_REG (ref)) gcc_assert (!oldreg || oldreg == DF_REF_REG (ref));
abort ();
if (! validate_change (DF_REF_INSN (ref), DF_REF_LOC (ref), newreg, 1)) if (! validate_change (DF_REF_INSN (ref), DF_REF_LOC (ref), newreg, 1))
return 0; return 0;
...@@ -2911,10 +2897,8 @@ df_insns_modify (struct df *df, basic_block bb, rtx first_insn, rtx last_insn) ...@@ -2911,10 +2897,8 @@ df_insns_modify (struct df *df, basic_block bb, rtx first_insn, rtx last_insn)
/* A non-const call should not have slipped through the net. If /* A non-const call should not have slipped through the net. If
it does, we need to create a new basic block. Ouch. The it does, we need to create a new basic block. Ouch. The
same applies for a label. */ same applies for a label. */
if ((CALL_P (insn) gcc_assert ((!CALL_P (insn) || CONST_OR_PURE_CALL_P (insn))
&& ! CONST_OR_PURE_CALL_P (insn)) && !LABEL_P (insn));
|| LABEL_P (insn))
abort ();
uid = INSN_UID (insn); uid = INSN_UID (insn);
...@@ -2937,8 +2921,7 @@ df_pattern_emit_before (struct df *df, rtx pattern, basic_block bb, rtx insn) ...@@ -2937,8 +2921,7 @@ df_pattern_emit_before (struct df *df, rtx pattern, basic_block bb, rtx insn)
rtx prev_insn = PREV_INSN (insn); rtx prev_insn = PREV_INSN (insn);
/* We should not be inserting before the start of the block. */ /* We should not be inserting before the start of the block. */
if (insn == BB_HEAD (bb)) gcc_assert (insn != BB_HEAD (bb));
abort ();
ret_insn = emit_insn_before (pattern, insn); ret_insn = emit_insn_before (pattern, insn);
if (ret_insn == insn) if (ret_insn == insn)
return ret_insn; return ret_insn;
...@@ -3196,10 +3179,7 @@ df_bb_reg_live_start_p (struct df *df, basic_block bb, rtx reg) ...@@ -3196,10 +3179,7 @@ df_bb_reg_live_start_p (struct df *df, basic_block bb, rtx reg)
{ {
struct bb_info *bb_info = DF_BB_INFO (df, bb); struct bb_info *bb_info = DF_BB_INFO (df, bb);
#ifdef ENABLE_CHECKING gcc_assert (bb_info->lr_in);
if (! bb_info->lr_in)
abort ();
#endif
return bitmap_bit_p (bb_info->lr_in, REGNO (reg)); return bitmap_bit_p (bb_info->lr_in, REGNO (reg));
} }
...@@ -3211,10 +3191,7 @@ df_bb_reg_live_end_p (struct df *df, basic_block bb, rtx reg) ...@@ -3211,10 +3191,7 @@ df_bb_reg_live_end_p (struct df *df, basic_block bb, rtx reg)
{ {
struct bb_info *bb_info = DF_BB_INFO (df, bb); struct bb_info *bb_info = DF_BB_INFO (df, bb);
#ifdef ENABLE_CHECKING gcc_assert (bb_info->lr_in);
if (! bb_info->lr_in)
abort ();
#endif
return bitmap_bit_p (bb_info->lr_out, REGNO (reg)); return bitmap_bit_p (bb_info->lr_out, REGNO (reg));
} }
...@@ -3234,9 +3211,8 @@ df_bb_regs_lives_compare (struct df *df, basic_block bb, rtx reg1, rtx reg2) ...@@ -3234,9 +3211,8 @@ df_bb_regs_lives_compare (struct df *df, basic_block bb, rtx reg1, rtx reg2)
/* The regs must be local to BB. */ /* The regs must be local to BB. */
if (df_regno_bb (df, regno1) != bb gcc_assert (df_regno_bb (df, regno1) == bb
|| df_regno_bb (df, regno2) != bb) && df_regno_bb (df, regno2) == bb);
abort ();
def2 = df_bb_regno_first_def_find (df, bb, regno2); def2 = df_bb_regno_first_def_find (df, bb, regno2);
use1 = df_bb_regno_last_use_find (df, bb, regno1); use1 = df_bb_regno_last_use_find (df, bb, regno1);
...@@ -3380,8 +3356,7 @@ df_bb_single_def_use_insn_find (struct df *df, basic_block bb, rtx insn, rtx reg ...@@ -3380,8 +3356,7 @@ df_bb_single_def_use_insn_find (struct df *df, basic_block bb, rtx insn, rtx reg
def = df_bb_insn_regno_first_def_find (df, bb, insn, REGNO (reg)); def = df_bb_insn_regno_first_def_find (df, bb, insn, REGNO (reg));
if (! def) gcc_assert (def);
abort ();
du_link = DF_REF_CHAIN (def); du_link = DF_REF_CHAIN (def);
...@@ -3761,7 +3736,7 @@ dataflow_set_a_op_b (enum set_representation repr, ...@@ -3761,7 +3736,7 @@ dataflow_set_a_op_b (enum set_representation repr,
break; break;
default: default:
abort (); gcc_unreachable ();
} }
break; break;
...@@ -3777,12 +3752,12 @@ dataflow_set_a_op_b (enum set_representation repr, ...@@ -3777,12 +3752,12 @@ dataflow_set_a_op_b (enum set_representation repr,
break; break;
default: default:
abort (); gcc_unreachable ();
} }
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -3800,7 +3775,7 @@ dataflow_set_copy (enum set_representation repr, void *dest, void *src) ...@@ -3800,7 +3775,7 @@ dataflow_set_copy (enum set_representation repr, void *dest, void *src)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -3816,8 +3791,7 @@ hybrid_search (basic_block bb, struct dataflow *dataflow, ...@@ -3816,8 +3791,7 @@ hybrid_search (basic_block bb, struct dataflow *dataflow,
edge e; edge e;
SET_BIT (visited, bb->index); SET_BIT (visited, bb->index);
if (!TEST_BIT (pending, bb->index)) gcc_assert (TEST_BIT (pending, bb->index));
abort ();
RESET_BIT (pending, i); RESET_BIT (pending, i);
#define HS(E_ANTI, E_ANTI_NEXT, E_ANTI_BB, E_ANTI_START_BB, IN_SET, \ #define HS(E_ANTI, E_ANTI_NEXT, E_ANTI_BB, E_ANTI_START_BB, IN_SET, \
......
...@@ -174,8 +174,7 @@ diagnostic_build_prefix (diagnostic_info *diagnostic) ...@@ -174,8 +174,7 @@ diagnostic_build_prefix (diagnostic_info *diagnostic)
"must-not-happen" "must-not-happen"
}; };
expanded_location s = expand_location (diagnostic->location); expanded_location s = expand_location (diagnostic->location);
if (diagnostic->kind >= DK_LAST_DIAGNOSTIC_KIND) gcc_assert (diagnostic->kind < DK_LAST_DIAGNOSTIC_KIND);
abort();
return s.file return s.file
? build_message_string ("%s:%d: %s", ? build_message_string ("%s:%d: %s",
...@@ -194,8 +193,7 @@ diagnostic_count_diagnostic (diagnostic_context *context, ...@@ -194,8 +193,7 @@ diagnostic_count_diagnostic (diagnostic_context *context,
switch (kind) switch (kind)
{ {
default: default:
abort(); gcc_unreachable ();
break;
case DK_ICE: case DK_ICE:
#ifndef ENABLE_CHECKING #ifndef ENABLE_CHECKING
......
...@@ -265,7 +265,7 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -265,7 +265,7 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
case COMPOUND_EXPR: case COMPOUND_EXPR:
case COND_EXPR: case COND_EXPR:
/* Lowered by gimplify.c. */ /* Lowered by gimplify.c. */
abort (); gcc_unreachable ();
case COMPONENT_REF: case COMPONENT_REF:
case BIT_FIELD_REF: case BIT_FIELD_REF:
...@@ -301,10 +301,12 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -301,10 +301,12 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
{ {
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0)); tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_FLOAT gcc_assert (GET_MODE_CLASS (TYPE_MODE (inner_type))
|| GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_INT) != MODE_COMPLEX_FLOAT);
abort (); gcc_assert (GET_MODE_CLASS (TYPE_MODE (inner_type))
else if (integer_zerop (TREE_OPERAND (exp, 1))) != MODE_COMPLEX_INT);
if (integer_zerop (TREE_OPERAND (exp, 1)))
do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label);
else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT
&& !can_compare_p (EQ, TYPE_MODE (inner_type), ccp_jump)) && !can_compare_p (EQ, TYPE_MODE (inner_type), ccp_jump))
...@@ -318,10 +320,12 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -318,10 +320,12 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
{ {
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0)); tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_FLOAT gcc_assert (GET_MODE_CLASS (TYPE_MODE (inner_type))
|| GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_COMPLEX_INT) != MODE_COMPLEX_FLOAT);
abort (); gcc_assert (GET_MODE_CLASS (TYPE_MODE (inner_type))
else if (integer_zerop (TREE_OPERAND (exp, 1))) != MODE_COMPLEX_INT);
if (integer_zerop (TREE_OPERAND (exp, 1)))
do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label);
else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT
&& !can_compare_p (NE, TYPE_MODE (inner_type), ccp_jump)) && !can_compare_p (NE, TYPE_MODE (inner_type), ccp_jump))
...@@ -511,8 +515,10 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -511,8 +515,10 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
&& ! can_compare_p (NE, GET_MODE (temp), ccp_jump)) && ! can_compare_p (NE, GET_MODE (temp), ccp_jump))
/* Note swapping the labels gives us not-equal. */ /* Note swapping the labels gives us not-equal. */
do_jump_by_parts_equality_rtx (temp, if_true_label, if_false_label); do_jump_by_parts_equality_rtx (temp, if_true_label, if_false_label);
else if (GET_MODE (temp) != VOIDmode) else
{ {
gcc_assert (GET_MODE (temp) != VOIDmode);
/* The RTL optimizers prefer comparisons against pseudos. */ /* The RTL optimizers prefer comparisons against pseudos. */
if (GET_CODE (temp) == SUBREG) if (GET_CODE (temp) == SUBREG)
{ {
...@@ -528,8 +534,6 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -528,8 +534,6 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
GET_MODE (temp), NULL_RTX, GET_MODE (temp), NULL_RTX,
if_false_label, if_true_label); if_false_label, if_true_label);
} }
else
abort ();
} }
} }
......
...@@ -271,8 +271,7 @@ calc_dfs_tree_nonrec (struct dom_info *di, basic_block bb, ...@@ -271,8 +271,7 @@ calc_dfs_tree_nonrec (struct dom_info *di, basic_block bb,
e_next = bn->succ; e_next = bn->succ;
} }
if (bn == en_block) gcc_assert (bn != en_block);
abort ();
/* Fill the DFS tree info calculatable _before_ recursing. */ /* Fill the DFS tree info calculatable _before_ recursing. */
if (bb != en_block) if (bb != en_block)
...@@ -375,8 +374,7 @@ calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse) ...@@ -375,8 +374,7 @@ calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse)
di->nodes = di->dfsnum - 1; di->nodes = di->dfsnum - 1;
/* This aborts e.g. when there is _no_ path from ENTRY to EXIT at all. */ /* This aborts e.g. when there is _no_ path from ENTRY to EXIT at all. */
if (di->nodes != (unsigned int) n_basic_blocks + 1) gcc_assert (di->nodes == (unsigned int) n_basic_blocks + 1);
abort ();
} }
/* Compress the path from V to the root of its set and update path_min at the /* Compress the path from V to the root of its set and update path_min at the
...@@ -597,8 +595,7 @@ compute_dom_fast_query (enum cdi_direction dir) ...@@ -597,8 +595,7 @@ compute_dom_fast_query (enum cdi_direction dir)
int num = 0; int num = 0;
basic_block bb; basic_block bb;
if (dom_computed[dir] < DOM_NO_FAST_QUERY) gcc_assert (dom_computed[dir] >= DOM_NO_FAST_QUERY);
abort ();
if (dom_computed[dir] == DOM_OK) if (dom_computed[dir] == DOM_OK)
return; return;
...@@ -629,8 +626,7 @@ calculate_dominance_info (enum cdi_direction dir) ...@@ -629,8 +626,7 @@ calculate_dominance_info (enum cdi_direction dir)
if (dom_computed[dir] != DOM_NONE) if (dom_computed[dir] != DOM_NONE)
free_dominance_info (dir); free_dominance_info (dir);
if (n_bbs_in_dom_tree[dir]) gcc_assert (!n_bbs_in_dom_tree[dir]);
abort ();
FOR_ALL_BB (b) FOR_ALL_BB (b)
{ {
...@@ -672,8 +668,7 @@ free_dominance_info (enum cdi_direction dir) ...@@ -672,8 +668,7 @@ free_dominance_info (enum cdi_direction dir)
} }
/* If there are any nodes left, something is wrong. */ /* If there are any nodes left, something is wrong. */
if (n_bbs_in_dom_tree[dir]) gcc_assert (!n_bbs_in_dom_tree[dir]);
abort ();
dom_computed[dir] = DOM_NONE; dom_computed[dir] = DOM_NONE;
} }
...@@ -684,8 +679,7 @@ get_immediate_dominator (enum cdi_direction dir, basic_block bb) ...@@ -684,8 +679,7 @@ get_immediate_dominator (enum cdi_direction dir, basic_block bb)
{ {
struct et_node *node = bb->dom[dir]; struct et_node *node = bb->dom[dir];
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (!node->father) if (!node->father)
return NULL; return NULL;
...@@ -701,8 +695,7 @@ set_immediate_dominator (enum cdi_direction dir, basic_block bb, ...@@ -701,8 +695,7 @@ set_immediate_dominator (enum cdi_direction dir, basic_block bb,
{ {
struct et_node *node = bb->dom[dir]; struct et_node *node = bb->dom[dir];
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (node->father) if (node->father)
{ {
...@@ -726,8 +719,7 @@ get_dominated_by (enum cdi_direction dir, basic_block bb, basic_block **bbs) ...@@ -726,8 +719,7 @@ get_dominated_by (enum cdi_direction dir, basic_block bb, basic_block **bbs)
int n; int n;
struct et_node *node = bb->dom[dir], *son = node->son, *ason; struct et_node *node = bb->dom[dir], *son = node->son, *ason;
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (!son) if (!son)
{ {
...@@ -753,8 +745,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb, ...@@ -753,8 +745,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb,
{ {
struct et_node *bb_node = bb->dom[dir], *to_node = to->dom[dir], *son; struct et_node *bb_node = bb->dom[dir], *to_node = to->dom[dir], *son;
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (!bb_node->son) if (!bb_node->son)
return; return;
...@@ -775,8 +766,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb, ...@@ -775,8 +766,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb,
basic_block basic_block
nearest_common_dominator (enum cdi_direction dir, basic_block bb1, basic_block bb2) nearest_common_dominator (enum cdi_direction dir, basic_block bb1, basic_block bb2)
{ {
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (!bb1) if (!bb1)
return bb2; return bb2;
...@@ -792,8 +782,7 @@ dominated_by_p (enum cdi_direction dir, basic_block bb1, basic_block bb2) ...@@ -792,8 +782,7 @@ dominated_by_p (enum cdi_direction dir, basic_block bb1, basic_block bb2)
{ {
struct et_node *n1 = bb1->dom[dir], *n2 = bb2->dom[dir]; struct et_node *n1 = bb1->dom[dir], *n2 = bb2->dom[dir];
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (dom_computed[dir] == DOM_OK) if (dom_computed[dir] == DOM_OK)
return (n1->dfs_num_in >= n2->dfs_num_in return (n1->dfs_num_in >= n2->dfs_num_in
...@@ -809,8 +798,7 @@ verify_dominators (enum cdi_direction dir) ...@@ -809,8 +798,7 @@ verify_dominators (enum cdi_direction dir)
int err = 0; int err = 0;
basic_block bb; basic_block bb;
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
{ {
...@@ -838,8 +826,7 @@ verify_dominators (enum cdi_direction dir) ...@@ -838,8 +826,7 @@ verify_dominators (enum cdi_direction dir)
} }
} }
if (err) gcc_assert (!err);
abort ();
} }
/* Determine immediate dominator (or postdominator, according to DIR) of BB, /* Determine immediate dominator (or postdominator, according to DIR) of BB,
...@@ -853,8 +840,7 @@ recount_dominator (enum cdi_direction dir, basic_block bb) ...@@ -853,8 +840,7 @@ recount_dominator (enum cdi_direction dir, basic_block bb)
basic_block dom_bb = NULL; basic_block dom_bb = NULL;
edge e; edge e;
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
if (dir == CDI_DOMINATORS) if (dir == CDI_DOMINATORS)
{ {
...@@ -889,8 +875,7 @@ iterate_fix_dominators (enum cdi_direction dir, basic_block *bbs, int n) ...@@ -889,8 +875,7 @@ iterate_fix_dominators (enum cdi_direction dir, basic_block *bbs, int n)
int i, changed = 1; int i, changed = 1;
basic_block old_dom, new_dom; basic_block old_dom, new_dom;
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
set_immediate_dominator (dir, bbs[i], NULL); set_immediate_dominator (dir, bbs[i], NULL);
...@@ -911,18 +896,14 @@ iterate_fix_dominators (enum cdi_direction dir, basic_block *bbs, int n) ...@@ -911,18 +896,14 @@ iterate_fix_dominators (enum cdi_direction dir, basic_block *bbs, int n)
} }
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
if (!get_immediate_dominator (dir, bbs[i])) gcc_assert (get_immediate_dominator (dir, bbs[i]));
abort ();
} }
void void
add_to_dominance_info (enum cdi_direction dir, basic_block bb) add_to_dominance_info (enum cdi_direction dir, basic_block bb)
{ {
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort (); gcc_assert (!bb->dom[dir]);
if (bb->dom[dir])
abort ();
n_bbs_in_dom_tree[dir]++; n_bbs_in_dom_tree[dir]++;
...@@ -935,8 +916,7 @@ add_to_dominance_info (enum cdi_direction dir, basic_block bb) ...@@ -935,8 +916,7 @@ add_to_dominance_info (enum cdi_direction dir, basic_block bb)
void void
delete_from_dominance_info (enum cdi_direction dir, basic_block bb) delete_from_dominance_info (enum cdi_direction dir, basic_block bb)
{ {
if (!dom_computed[dir]) gcc_assert (dom_computed[dir]);
abort ();
et_free_tree (bb->dom[dir]); et_free_tree (bb->dom[dir]);
bb->dom[dir] = NULL; bb->dom[dir] = NULL;
......
...@@ -333,8 +333,9 @@ size_of_encoded_value (int encoding) ...@@ -333,8 +333,9 @@ size_of_encoded_value (int encoding)
return 4; return 4;
case DW_EH_PE_udata8: case DW_EH_PE_udata8:
return 8; return 8;
default:
gcc_unreachable ();
} }
abort ();
} }
/* Yield a name for a given pointer encoding. */ /* Yield a name for a given pointer encoding. */
...@@ -486,12 +487,12 @@ eh_data_format_name (int format) ...@@ -486,12 +487,12 @@ eh_data_format_name (int format)
#if HAVE_DESIGNATED_INITIALIZERS #if HAVE_DESIGNATED_INITIALIZERS
}; };
if (format < 0 || format > 0xff || format_names[format] == NULL) gcc_assert (format >= 0 && format < 0x100 && format_names[format]);
abort ();
return format_names[format]; return format_names[format];
#else #else
} }
abort (); gcc_unreachable ();
#endif #endif
} }
...@@ -635,7 +636,7 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED, ...@@ -635,7 +636,7 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED,
fputc ('-', asm_out_file); fputc ('-', asm_out_file);
assemble_name (asm_out_file, lab2); assemble_name (asm_out_file, lab2);
#else #else
abort (); gcc_unreachable ();
#endif #endif
if (flag_debug_asm && comment) if (flag_debug_asm && comment)
...@@ -663,7 +664,7 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED, ...@@ -663,7 +664,7 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
fputc ('-', asm_out_file); fputc ('-', asm_out_file);
assemble_name (asm_out_file, lab2); assemble_name (asm_out_file, lab2);
#else #else
abort (); gcc_unreachable ();
#endif #endif
if (flag_debug_asm && comment) if (flag_debug_asm && comment)
...@@ -704,8 +705,7 @@ dw2_force_const_mem (rtx x) ...@@ -704,8 +705,7 @@ dw2_force_const_mem (rtx x)
if (! indirect_pool) if (! indirect_pool)
indirect_pool = splay_tree_new_ggc (splay_tree_compare_pointers); indirect_pool = splay_tree_new_ggc (splay_tree_compare_pointers);
if (GET_CODE (x) != SYMBOL_REF) gcc_assert (GET_CODE (x) == SYMBOL_REF);
abort ();
str = targetm.strip_name_encoding (XSTR (x, 0)); str = targetm.strip_name_encoding (XSTR (x, 0));
node = splay_tree_lookup (indirect_pool, (splay_tree_key) str); node = splay_tree_lookup (indirect_pool, (splay_tree_key) str);
...@@ -836,8 +836,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, ...@@ -836,8 +836,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr,
break; break;
case DW_EH_PE_pcrel: case DW_EH_PE_pcrel:
if (GET_CODE (addr) != SYMBOL_REF) gcc_assert (GET_CODE (addr) == SYMBOL_REF);
abort ();
#ifdef ASM_OUTPUT_DWARF_PCREL #ifdef ASM_OUTPUT_DWARF_PCREL
ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, XSTR (addr, 0)); ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, XSTR (addr, 0));
#else #else
...@@ -848,7 +847,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, ...@@ -848,7 +847,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr,
default: default:
/* Other encodings should have been handled by /* Other encodings should have been handled by
ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX. */ ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX. */
abort (); gcc_unreachable ();
} }
#ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX #ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX
......
...@@ -489,8 +489,7 @@ expand_builtin_init_dwarf_reg_sizes (tree address) ...@@ -489,8 +489,7 @@ expand_builtin_init_dwarf_reg_sizes (tree address)
} }
#ifdef DWARF_ALT_FRAME_RETURN_COLUMN #ifdef DWARF_ALT_FRAME_RETURN_COLUMN
if (! wrote_return_column) gcc_assert (wrote_return_column);
abort ();
i = DWARF_ALT_FRAME_RETURN_COLUMN; i = DWARF_ALT_FRAME_RETURN_COLUMN;
wrote_return_column = false; wrote_return_column = false;
#else #else
...@@ -829,8 +828,7 @@ reg_save (const char *label, unsigned int reg, unsigned int sreg, HOST_WIDE_INT ...@@ -829,8 +828,7 @@ reg_save (const char *label, unsigned int reg, unsigned int sreg, HOST_WIDE_INT
description. */ description. */
HOST_WIDE_INT check_offset = offset / DWARF_CIE_DATA_ALIGNMENT; HOST_WIDE_INT check_offset = offset / DWARF_CIE_DATA_ALIGNMENT;
if (check_offset * DWARF_CIE_DATA_ALIGNMENT != offset) gcc_assert (check_offset * DWARF_CIE_DATA_ALIGNMENT == offset);
abort ();
} }
#endif #endif
offset /= DWARF_CIE_DATA_ALIGNMENT; offset /= DWARF_CIE_DATA_ALIGNMENT;
...@@ -934,25 +932,22 @@ initial_return_save (rtx rtl) ...@@ -934,25 +932,22 @@ initial_return_save (rtx rtl)
switch (GET_CODE (rtl)) switch (GET_CODE (rtl))
{ {
case REG: case REG:
if (REGNO (rtl) != STACK_POINTER_REGNUM) gcc_assert (REGNO (rtl) == STACK_POINTER_REGNUM);
abort ();
offset = 0; offset = 0;
break; break;
case PLUS: case PLUS:
if (REGNO (XEXP (rtl, 0)) != STACK_POINTER_REGNUM) gcc_assert (REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM);
abort ();
offset = INTVAL (XEXP (rtl, 1)); offset = INTVAL (XEXP (rtl, 1));
break; break;
case MINUS: case MINUS:
if (REGNO (XEXP (rtl, 0)) != STACK_POINTER_REGNUM) gcc_assert (REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM);
abort ();
offset = -INTVAL (XEXP (rtl, 1)); offset = -INTVAL (XEXP (rtl, 1));
break; break;
default: default:
abort (); gcc_unreachable ();
} }
break; break;
...@@ -961,13 +956,12 @@ initial_return_save (rtx rtl) ...@@ -961,13 +956,12 @@ initial_return_save (rtx rtl)
/* The return address is at some offset from any value we can /* The return address is at some offset from any value we can
actually load. For instance, on the SPARC it is in %i7+8. Just actually load. For instance, on the SPARC it is in %i7+8. Just
ignore the offset for now; it doesn't matter for unwinding frames. */ ignore the offset for now; it doesn't matter for unwinding frames. */
if (GET_CODE (XEXP (rtl, 1)) != CONST_INT) gcc_assert (GET_CODE (XEXP (rtl, 1)) == CONST_INT);
abort ();
initial_return_save (XEXP (rtl, 0)); initial_return_save (XEXP (rtl, 0));
return; return;
default: default:
abort (); gcc_unreachable ();
} }
if (reg != DWARF_FRAME_RETURN_COLUMN) if (reg != DWARF_FRAME_RETURN_COLUMN)
...@@ -1012,9 +1006,8 @@ stack_adjust_offset (rtx pattern) ...@@ -1012,9 +1006,8 @@ stack_adjust_offset (rtx pattern)
{ {
rtx val = XEXP (XEXP (src, 1), 1); rtx val = XEXP (XEXP (src, 1), 1);
/* We handle only adjustments by constant amount. */ /* We handle only adjustments by constant amount. */
if (GET_CODE (XEXP (src, 1)) != PLUS || gcc_assert (GET_CODE (XEXP (src, 1)) == PLUS
GET_CODE (val) != CONST_INT) && GET_CODE (val) == CONST_INT);
abort ();
offset = -INTVAL (val); offset = -INTVAL (val);
break; break;
} }
...@@ -1074,8 +1067,7 @@ dwarf2out_stack_adjust (rtx insn) ...@@ -1074,8 +1067,7 @@ dwarf2out_stack_adjust (rtx insn)
insn = XVECEXP (insn, 0, 0); insn = XVECEXP (insn, 0, 0);
if (GET_CODE (insn) == SET) if (GET_CODE (insn) == SET)
insn = SET_SRC (insn); insn = SET_SRC (insn);
if (GET_CODE (insn) != CALL) gcc_assert (GET_CODE (insn) == CALL);
abort ();
dwarf2out_args_size ("", INTVAL (XEXP (insn, 1))); dwarf2out_args_size ("", INTVAL (XEXP (insn, 1)));
return; return;
...@@ -1208,8 +1200,7 @@ flush_queued_reg_saves (void) ...@@ -1208,8 +1200,7 @@ flush_queued_reg_saves (void)
break; break;
if (q->saved_reg && i == num_regs_saved_in_regs) if (q->saved_reg && i == num_regs_saved_in_regs)
{ {
if (i == ARRAY_SIZE (regs_saved_in_regs)) gcc_assert (i != ARRAY_SIZE (regs_saved_in_regs));
abort ();
num_regs_saved_in_regs++; num_regs_saved_in_regs++;
} }
if (i != num_regs_saved_in_regs) if (i != num_regs_saved_in_regs)
...@@ -1466,8 +1457,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1466,8 +1457,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
return; return;
} }
if (GET_CODE (expr) != SET) gcc_assert (GET_CODE (expr) == SET);
abort ();
src = SET_SRC (expr); src = SET_SRC (expr);
dest = SET_DEST (expr); dest = SET_DEST (expr);
...@@ -1500,14 +1490,13 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1500,14 +1490,13 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
cfa_temp.reg = cfa.reg; cfa_temp.reg = cfa.reg;
cfa_temp.offset = cfa.offset; cfa_temp.offset = cfa.offset;
} }
else if (call_used_regs [REGNO (dest)] else
&& ! fixed_regs [REGNO (dest)])
{ {
/* Saving a register in a register. */ /* Saving a register in a register. */
gcc_assert (call_used_regs [REGNO (dest)]
&& !fixed_regs [REGNO (dest)]);
queue_reg_save (label, src, dest, 0); queue_reg_save (label, src, dest, 0);
} }
else
abort ();
break; break;
case PLUS: case PLUS:
...@@ -1523,26 +1512,25 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1523,26 +1512,25 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
offset = INTVAL (XEXP (src, 1)); offset = INTVAL (XEXP (src, 1));
break; break;
case REG: case REG:
if ((unsigned) REGNO (XEXP (src, 1)) != cfa_temp.reg) gcc_assert ((unsigned) REGNO (XEXP (src, 1))
abort (); == cfa_temp.reg);
offset = cfa_temp.offset; offset = cfa_temp.offset;
break; break;
default: default:
abort (); gcc_unreachable ();
} }
if (XEXP (src, 0) == hard_frame_pointer_rtx) if (XEXP (src, 0) == hard_frame_pointer_rtx)
{ {
/* Restoring SP from FP in the epilogue. */ /* Restoring SP from FP in the epilogue. */
if (cfa.reg != (unsigned) HARD_FRAME_POINTER_REGNUM) gcc_assert (cfa.reg == (unsigned) HARD_FRAME_POINTER_REGNUM);
abort ();
cfa.reg = STACK_POINTER_REGNUM; cfa.reg = STACK_POINTER_REGNUM;
} }
else if (GET_CODE (src) == LO_SUM) else if (GET_CODE (src) == LO_SUM)
/* Assume we've set the source reg of the LO_SUM from sp. */ /* Assume we've set the source reg of the LO_SUM from sp. */
; ;
else if (XEXP (src, 0) != stack_pointer_rtx) else
abort (); gcc_assert (XEXP (src, 0) == stack_pointer_rtx);
if (GET_CODE (src) != MINUS) if (GET_CODE (src) != MINUS)
offset = -offset; offset = -offset;
...@@ -1556,26 +1544,20 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1556,26 +1544,20 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
/* Rule 3 */ /* Rule 3 */
/* Either setting the FP from an offset of the SP, /* Either setting the FP from an offset of the SP,
or adjusting the FP */ or adjusting the FP */
if (! frame_pointer_needed) gcc_assert (frame_pointer_needed);
abort ();
if (REG_P (XEXP (src, 0)) gcc_assert (REG_P (XEXP (src, 0))
&& (unsigned) REGNO (XEXP (src, 0)) == cfa.reg && (unsigned) REGNO (XEXP (src, 0)) == cfa.reg
&& GET_CODE (XEXP (src, 1)) == CONST_INT) && GET_CODE (XEXP (src, 1)) == CONST_INT);
{ offset = INTVAL (XEXP (src, 1));
offset = INTVAL (XEXP (src, 1)); if (GET_CODE (src) != MINUS)
if (GET_CODE (src) != MINUS) offset = -offset;
offset = -offset; cfa.offset += offset;
cfa.offset += offset; cfa.reg = HARD_FRAME_POINTER_REGNUM;
cfa.reg = HARD_FRAME_POINTER_REGNUM;
}
else
abort ();
} }
else else
{ {
if (GET_CODE (src) == MINUS) gcc_assert (GET_CODE (src) != MINUS);
abort ();
/* Rule 4 */ /* Rule 4 */
if (REG_P (XEXP (src, 0)) if (REG_P (XEXP (src, 0))
...@@ -1599,8 +1581,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1599,8 +1581,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
{ {
/* Setting a scratch register that we will use instead /* Setting a scratch register that we will use instead
of SP for saving registers to the stack. */ of SP for saving registers to the stack. */
if (cfa.reg != STACK_POINTER_REGNUM) gcc_assert (cfa.reg == STACK_POINTER_REGNUM);
abort ();
cfa_store.reg = REGNO (dest); cfa_store.reg = REGNO (dest);
cfa_store.offset = cfa.offset - cfa_temp.offset; cfa_store.offset = cfa.offset - cfa_temp.offset;
} }
...@@ -1613,7 +1594,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1613,7 +1594,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
cfa_temp.offset = INTVAL (XEXP (src, 1)); cfa_temp.offset = INTVAL (XEXP (src, 1));
} }
else else
abort (); gcc_unreachable ();
} }
break; break;
...@@ -1625,10 +1606,9 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1625,10 +1606,9 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
/* Rule 7 */ /* Rule 7 */
case IOR: case IOR:
if (!REG_P (XEXP (src, 0)) gcc_assert (REG_P (XEXP (src, 0))
|| (unsigned) REGNO (XEXP (src, 0)) != cfa_temp.reg && (unsigned) REGNO (XEXP (src, 0)) == cfa_temp.reg
|| GET_CODE (XEXP (src, 1)) != CONST_INT) && GET_CODE (XEXP (src, 1)) == CONST_INT);
abort ();
if ((unsigned) REGNO (dest) != cfa_temp.reg) if ((unsigned) REGNO (dest) != cfa_temp.reg)
cfa_temp.reg = REGNO (dest); cfa_temp.reg = REGNO (dest);
...@@ -1642,15 +1622,14 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1642,15 +1622,14 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
def_cfa_1 (label, &cfa); def_cfa_1 (label, &cfa);
break; break;
case MEM: case MEM:
if (!REG_P (src)) gcc_assert (REG_P (src));
abort ();
/* Saving a register to the stack. Make sure dest is relative to the /* Saving a register to the stack. Make sure dest is relative to the
CFA register. */ CFA register. */
...@@ -1660,13 +1639,12 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1660,13 +1639,12 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
/* With a push. */ /* With a push. */
case PRE_MODIFY: case PRE_MODIFY:
/* We can't handle variable size modifications. */ /* We can't handle variable size modifications. */
if (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1)) != CONST_INT) gcc_assert (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1))
abort (); == CONST_INT);
offset = -INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1)); offset = -INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1));
if (REGNO (XEXP (XEXP (dest, 0), 0)) != STACK_POINTER_REGNUM gcc_assert (REGNO (XEXP (XEXP (dest, 0), 0)) == STACK_POINTER_REGNUM
|| cfa_store.reg != STACK_POINTER_REGNUM) && cfa_store.reg == STACK_POINTER_REGNUM);
abort ();
cfa_store.offset += offset; cfa_store.offset += offset;
if (cfa.reg == STACK_POINTER_REGNUM) if (cfa.reg == STACK_POINTER_REGNUM)
...@@ -1682,9 +1660,8 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1682,9 +1660,8 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
if (GET_CODE (XEXP (dest, 0)) == PRE_INC) if (GET_CODE (XEXP (dest, 0)) == PRE_INC)
offset = -offset; offset = -offset;
if (REGNO (XEXP (XEXP (dest, 0), 0)) != STACK_POINTER_REGNUM gcc_assert (REGNO (XEXP (XEXP (dest, 0), 0)) == STACK_POINTER_REGNUM
|| cfa_store.reg != STACK_POINTER_REGNUM) && cfa_store.reg == STACK_POINTER_REGNUM);
abort ();
cfa_store.offset += offset; cfa_store.offset += offset;
if (cfa.reg == STACK_POINTER_REGNUM) if (cfa.reg == STACK_POINTER_REGNUM)
...@@ -1698,41 +1675,52 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1698,41 +1675,52 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
case PLUS: case PLUS:
case MINUS: case MINUS:
case LO_SUM: case LO_SUM:
if (GET_CODE (XEXP (XEXP (dest, 0), 1)) != CONST_INT) {
abort (); int regno;
offset = INTVAL (XEXP (XEXP (dest, 0), 1));
if (GET_CODE (XEXP (dest, 0)) == MINUS) gcc_assert (GET_CODE (XEXP (XEXP (dest, 0), 1)) == CONST_INT);
offset = -offset; offset = INTVAL (XEXP (XEXP (dest, 0), 1));
if (GET_CODE (XEXP (dest, 0)) == MINUS)
if (cfa_store.reg == (unsigned) REGNO (XEXP (XEXP (dest, 0), 0))) offset = -offset;
offset -= cfa_store.offset;
else if (cfa_temp.reg == (unsigned) REGNO (XEXP (XEXP (dest, 0), 0))) regno = REGNO (XEXP (XEXP (dest, 0), 0));
offset -= cfa_temp.offset;
else if (cfa_store.reg == (unsigned) regno)
abort (); offset -= cfa_store.offset;
else
{
gcc_assert (cfa_temp.reg == (unsigned) regno);
offset -= cfa_temp.offset;
}
}
break; break;
/* Rule 13 */ /* Rule 13 */
/* Without an offset. */ /* Without an offset. */
case REG: case REG:
if (cfa_store.reg == (unsigned) REGNO (XEXP (dest, 0))) {
offset = -cfa_store.offset; int regno = REGNO (XEXP (dest, 0));
else if (cfa_temp.reg == (unsigned) REGNO (XEXP (dest, 0)))
offset = -cfa_temp.offset; if (cfa_store.reg == (unsigned) regno)
else offset = -cfa_store.offset;
abort (); else
{
gcc_assert (cfa_temp.reg == (unsigned) regno);
offset = -cfa_temp.offset;
}
}
break; break;
/* Rule 14 */ /* Rule 14 */
case POST_INC: case POST_INC:
if (cfa_temp.reg != (unsigned) REGNO (XEXP (XEXP (dest, 0), 0))) gcc_assert (cfa_temp.reg
abort (); == (unsigned) REGNO (XEXP (XEXP (dest, 0), 0)));
offset = -cfa_temp.offset; offset = -cfa_temp.offset;
cfa_temp.offset -= GET_MODE_SIZE (GET_MODE (dest)); cfa_temp.offset -= GET_MODE_SIZE (GET_MODE (dest));
break; break;
default: default:
abort (); gcc_unreachable ();
} }
if (REGNO (src) != STACK_POINTER_REGNUM if (REGNO (src) != STACK_POINTER_REGNUM
...@@ -1758,8 +1746,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1758,8 +1746,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
if (!REG_P (x)) if (!REG_P (x))
x = XEXP (x, 0); x = XEXP (x, 0);
if (!REG_P (x)) gcc_assert (REG_P (x));
abort ();
cfa.reg = REGNO (x); cfa.reg = REGNO (x);
cfa.base_offset = offset; cfa.base_offset = offset;
...@@ -1774,7 +1761,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) ...@@ -1774,7 +1761,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -1797,8 +1784,8 @@ dwarf2out_frame_debug (rtx insn) ...@@ -1797,8 +1784,8 @@ dwarf2out_frame_debug (rtx insn)
/* Set up state for generating call frame debug info. */ /* Set up state for generating call frame debug info. */
lookup_cfa (&cfa); lookup_cfa (&cfa);
if (cfa.reg != (unsigned long) DWARF_FRAME_REGNUM (STACK_POINTER_REGNUM)) gcc_assert (cfa.reg
abort (); == (unsigned long)DWARF_FRAME_REGNUM (STACK_POINTER_REGNUM));
cfa.reg = STACK_POINTER_REGNUM; cfa.reg = STACK_POINTER_REGNUM;
cfa_store = cfa; cfa_store = cfa;
...@@ -1879,7 +1866,7 @@ dw_cfi_oprnd1_desc (enum dwarf_call_frame_info cfi) ...@@ -1879,7 +1866,7 @@ dw_cfi_oprnd1_desc (enum dwarf_call_frame_info cfi)
return dw_cfi_oprnd_loc; return dw_cfi_oprnd_loc;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -2030,7 +2017,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh) ...@@ -2030,7 +2017,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
case DW_CFA_GNU_negative_offset_extended: case DW_CFA_GNU_negative_offset_extended:
/* Obsoleted by DW_CFA_offset_extended_sf. */ /* Obsoleted by DW_CFA_offset_extended_sf. */
abort (); gcc_unreachable ();
default: default:
break; break;
...@@ -2185,8 +2172,7 @@ output_call_frame_info (int for_eh) ...@@ -2185,8 +2172,7 @@ output_call_frame_info (int for_eh)
/* Augmentations should be small, so there's scarce need to /* Augmentations should be small, so there's scarce need to
iterate for a solution. Die if we exceed one uleb128 byte. */ iterate for a solution. Die if we exceed one uleb128 byte. */
if (size_of_uleb128 (augmentation_size) != 1) gcc_assert (size_of_uleb128 (augmentation_size) == 1);
abort ();
} }
} }
...@@ -2289,8 +2275,7 @@ output_call_frame_info (int for_eh) ...@@ -2289,8 +2275,7 @@ output_call_frame_info (int for_eh)
int pad = -offset & (PTR_SIZE - 1); int pad = -offset & (PTR_SIZE - 1);
size += pad; size += pad;
if (size_of_uleb128 (size) != 1) gcc_assert (size_of_uleb128 (size) == 1);
abort ();
} }
dw2_asm_output_data_uleb128 (size, "Augmentation size"); dw2_asm_output_data_uleb128 (size, "Augmentation size");
...@@ -3089,8 +3074,7 @@ output_loc_operands (dw_loc_descr_ref loc) ...@@ -3089,8 +3074,7 @@ output_loc_operands (dw_loc_descr_ref loc)
break; break;
case DW_OP_const8u: case DW_OP_const8u:
case DW_OP_const8s: case DW_OP_const8s:
if (HOST_BITS_PER_LONG < 64) gcc_assert (HOST_BITS_PER_LONG >= 64);
abort ();
dw2_asm_output_data (8, val1->v.val_int, NULL); dw2_asm_output_data (8, val1->v.val_int, NULL);
break; break;
case DW_OP_skip: case DW_OP_skip:
...@@ -3098,10 +3082,8 @@ output_loc_operands (dw_loc_descr_ref loc) ...@@ -3098,10 +3082,8 @@ output_loc_operands (dw_loc_descr_ref loc)
{ {
int offset; int offset;
if (val1->val_class == dw_val_class_loc) gcc_assert (val1->val_class == dw_val_class_loc);
offset = val1->v.val_loc->dw_loc_addr - (loc->dw_loc_addr + 3); offset = val1->v.val_loc->dw_loc_addr - (loc->dw_loc_addr + 3);
else
abort ();
dw2_asm_output_data (2, offset, NULL); dw2_asm_output_data (2, offset, NULL);
} }
...@@ -3120,7 +3102,7 @@ output_loc_operands (dw_loc_descr_ref loc) ...@@ -3120,7 +3102,7 @@ output_loc_operands (dw_loc_descr_ref loc)
aligned properly like we do for the main unwind info, so aligned properly like we do for the main unwind info, so
don't support emitting things larger than a byte if we're don't support emitting things larger than a byte if we're
only doing unwinding. */ only doing unwinding. */
abort (); gcc_unreachable ();
#endif #endif
case DW_OP_const1u: case DW_OP_const1u:
case DW_OP_const1s: case DW_OP_const1s:
...@@ -3196,7 +3178,7 @@ output_loc_operands (dw_loc_descr_ref loc) ...@@ -3196,7 +3178,7 @@ output_loc_operands (dw_loc_descr_ref loc)
val1->v.val_addr); val1->v.val_addr);
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
#else #else
abort (); gcc_unreachable ();
#endif #endif
break; break;
...@@ -3248,8 +3230,7 @@ build_cfa_loc (dw_cfa_location *cfa) ...@@ -3248,8 +3230,7 @@ build_cfa_loc (dw_cfa_location *cfa)
{ {
struct dw_loc_descr_struct *head, *tmp; struct dw_loc_descr_struct *head, *tmp;
if (cfa->indirect == 0) gcc_assert (cfa->indirect);
abort ();
if (cfa->base_offset) if (cfa->base_offset)
{ {
...@@ -4585,12 +4566,9 @@ decl_ultimate_origin (tree decl) ...@@ -4585,12 +4566,9 @@ decl_ultimate_origin (tree decl)
if (DECL_ABSTRACT (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl) if (DECL_ABSTRACT (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl)
return NULL_TREE; return NULL_TREE;
#ifdef ENABLE_CHECKING /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the
if (DECL_FROM_INLINE (DECL_ORIGIN (decl))) most distant ancestor, this should never happen. */
/* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the gcc_assert (!DECL_FROM_INLINE (DECL_ORIGIN (decl)));
most distant ancestor, this should never happen. */
abort ();
#endif
return DECL_ABSTRACT_ORIGIN (decl); return DECL_ABSTRACT_ORIGIN (decl);
} }
...@@ -4688,10 +4666,8 @@ add_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int flag) ...@@ -4688,10 +4666,8 @@ add_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int flag)
static inline unsigned static inline unsigned
AT_flag (dw_attr_ref a) AT_flag (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_flag) gcc_assert (a && AT_class (a) == dw_val_class_flag);
return a->dw_attr_val.v.val_flag; return a->dw_attr_val.v.val_flag;
abort ();
} }
/* Add a signed integer attribute value to a DIE. */ /* Add a signed integer attribute value to a DIE. */
...@@ -4711,10 +4687,8 @@ add_AT_int (dw_die_ref die, enum dwarf_attribute attr_kind, HOST_WIDE_INT int_va ...@@ -4711,10 +4687,8 @@ add_AT_int (dw_die_ref die, enum dwarf_attribute attr_kind, HOST_WIDE_INT int_va
static inline HOST_WIDE_INT static inline HOST_WIDE_INT
AT_int (dw_attr_ref a) AT_int (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_const) gcc_assert (a && AT_class (a) == dw_val_class_const);
return a->dw_attr_val.v.val_int; return a->dw_attr_val.v.val_int;
abort ();
} }
/* Add an unsigned integer attribute value to a DIE. */ /* Add an unsigned integer attribute value to a DIE. */
...@@ -4735,10 +4709,8 @@ add_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind, ...@@ -4735,10 +4709,8 @@ add_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind,
static inline unsigned HOST_WIDE_INT static inline unsigned HOST_WIDE_INT
AT_unsigned (dw_attr_ref a) AT_unsigned (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_unsigned_const) gcc_assert (a && AT_class (a) == dw_val_class_unsigned_const);
return a->dw_attr_val.v.val_unsigned; return a->dw_attr_val.v.val_unsigned;
abort ();
} }
/* Add an unsigned double integer attribute value to a DIE. */ /* Add an unsigned double integer attribute value to a DIE. */
...@@ -4820,10 +4792,8 @@ add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str) ...@@ -4820,10 +4792,8 @@ add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
static inline const char * static inline const char *
AT_string (dw_attr_ref a) AT_string (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_str) gcc_assert (a && AT_class (a) == dw_val_class_str);
return a->dw_attr_val.v.val_str->str; return a->dw_attr_val.v.val_str->str;
abort ();
} }
/* Find out whether a string should be output inline in DIE /* Find out whether a string should be output inline in DIE
...@@ -4832,38 +4802,35 @@ AT_string (dw_attr_ref a) ...@@ -4832,38 +4802,35 @@ AT_string (dw_attr_ref a)
static int static int
AT_string_form (dw_attr_ref a) AT_string_form (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_str) struct indirect_string_node *node;
{ unsigned int len;
struct indirect_string_node *node; char label[32];
unsigned int len;
char label[32];
node = a->dw_attr_val.v.val_str;
if (node->form)
return node->form;
len = strlen (node->str) + 1;
/* If the string is shorter or equal to the size of the reference, it is gcc_assert (a && AT_class (a) == dw_val_class_str);
always better to put it inline. */
if (len <= DWARF_OFFSET_SIZE || node->refcount == 0) node = a->dw_attr_val.v.val_str;
return node->form = DW_FORM_string; if (node->form)
return node->form;
len = strlen (node->str) + 1;
/* If we cannot expect the linker to merge strings in .debug_str /* If the string is shorter or equal to the size of the reference, it is
section, only put it into .debug_str if it is worth even in this always better to put it inline. */
single module. */ if (len <= DWARF_OFFSET_SIZE || node->refcount == 0)
if ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) == 0 return node->form = DW_FORM_string;
&& (len - DWARF_OFFSET_SIZE) * node->refcount <= len)
return node->form = DW_FORM_string;
ASM_GENERATE_INTERNAL_LABEL (label, "LASF", dw2_string_counter); /* If we cannot expect the linker to merge strings in .debug_str
++dw2_string_counter; section, only put it into .debug_str if it is worth even in this
node->label = xstrdup (label); single module. */
if ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) == 0
&& (len - DWARF_OFFSET_SIZE) * node->refcount <= len)
return node->form = DW_FORM_string;
return node->form = DW_FORM_strp; ASM_GENERATE_INTERNAL_LABEL (label, "LASF", dw2_string_counter);
} ++dw2_string_counter;
node->label = xstrdup (label);
abort (); return node->form = DW_FORM_strp;
} }
/* Add a DIE reference attribute value to a DIE. */ /* Add a DIE reference attribute value to a DIE. */
...@@ -4888,18 +4855,15 @@ static inline void ...@@ -4888,18 +4855,15 @@ static inline void
add_AT_specification (dw_die_ref die, dw_die_ref targ_die) add_AT_specification (dw_die_ref die, dw_die_ref targ_die)
{ {
add_AT_die_ref (die, DW_AT_specification, targ_die); add_AT_die_ref (die, DW_AT_specification, targ_die);
if (targ_die->die_definition) gcc_assert (!targ_die->die_definition);
abort ();
targ_die->die_definition = die; targ_die->die_definition = die;
} }
static inline dw_die_ref static inline dw_die_ref
AT_ref (dw_attr_ref a) AT_ref (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_die_ref) gcc_assert (a && AT_class (a) == dw_val_class_die_ref);
return a->dw_attr_val.v.val_die_ref.die; return a->dw_attr_val.v.val_die_ref.die;
abort ();
} }
static inline int static inline int
...@@ -4914,10 +4878,8 @@ AT_ref_external (dw_attr_ref a) ...@@ -4914,10 +4878,8 @@ AT_ref_external (dw_attr_ref a)
static inline void static inline void
set_AT_ref_external (dw_attr_ref a, int i) set_AT_ref_external (dw_attr_ref a, int i)
{ {
if (a && AT_class (a) == dw_val_class_die_ref) gcc_assert (a && AT_class (a) == dw_val_class_die_ref);
a->dw_attr_val.v.val_die_ref.external = i; a->dw_attr_val.v.val_die_ref.external = i;
else
abort ();
} }
/* Add an FDE reference attribute value to a DIE. */ /* Add an FDE reference attribute value to a DIE. */
...@@ -4951,10 +4913,8 @@ add_AT_loc (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_descr_ref loc ...@@ -4951,10 +4913,8 @@ add_AT_loc (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_descr_ref loc
static inline dw_loc_descr_ref static inline dw_loc_descr_ref
AT_loc (dw_attr_ref a) AT_loc (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_loc) gcc_assert (a && AT_class (a) == dw_val_class_loc);
return a->dw_attr_val.v.val_loc; return a->dw_attr_val.v.val_loc;
abort ();
} }
static inline void static inline void
...@@ -4973,10 +4933,8 @@ add_AT_loc_list (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_list_ref ...@@ -4973,10 +4933,8 @@ add_AT_loc_list (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_list_ref
static inline dw_loc_list_ref static inline dw_loc_list_ref
AT_loc_list (dw_attr_ref a) AT_loc_list (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_loc_list) gcc_assert (a && AT_class (a) == dw_val_class_loc_list);
return a->dw_attr_val.v.val_loc_list; return a->dw_attr_val.v.val_loc_list;
abort ();
} }
/* Add an address constant attribute value to a DIE. */ /* Add an address constant attribute value to a DIE. */
...@@ -4996,10 +4954,8 @@ add_AT_addr (dw_die_ref die, enum dwarf_attribute attr_kind, rtx addr) ...@@ -4996,10 +4954,8 @@ add_AT_addr (dw_die_ref die, enum dwarf_attribute attr_kind, rtx addr)
static inline rtx static inline rtx
AT_addr (dw_attr_ref a) AT_addr (dw_attr_ref a)
{ {
if (a && AT_class (a) == dw_val_class_addr) gcc_assert (a && AT_class (a) == dw_val_class_addr);
return a->dw_attr_val.v.val_addr; return a->dw_attr_val.v.val_addr;
abort ();
} }
/* Add a label identifier attribute value to a DIE. */ /* Add a label identifier attribute value to a DIE. */
...@@ -5063,11 +5019,9 @@ add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind, ...@@ -5063,11 +5019,9 @@ add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind,
static inline const char * static inline const char *
AT_lbl (dw_attr_ref a) AT_lbl (dw_attr_ref a)
{ {
if (a && (AT_class (a) == dw_val_class_lbl_id gcc_assert (a && (AT_class (a) == dw_val_class_lbl_id
|| AT_class (a) == dw_val_class_lbl_offset)) || AT_class (a) == dw_val_class_lbl_offset));
return a->dw_attr_val.v.val_lbl_id; return a->dw_attr_val.v.val_lbl_id;
abort ();
} }
/* Get the attribute of type attr_kind. */ /* Get the attribute of type attr_kind. */
...@@ -5317,8 +5271,7 @@ add_child_die (dw_die_ref die, dw_die_ref child_die) ...@@ -5317,8 +5271,7 @@ add_child_die (dw_die_ref die, dw_die_ref child_die)
{ {
if (die != NULL && child_die != NULL) if (die != NULL && child_die != NULL)
{ {
if (die == child_die) gcc_assert (die != child_die);
abort ();
child_die->die_parent = die; child_die->die_parent = die;
child_die->die_sib = die->die_child; child_die->die_sib = die->die_child;
...@@ -5344,9 +5297,9 @@ splice_child_die (dw_die_ref parent, dw_die_ref child) ...@@ -5344,9 +5297,9 @@ splice_child_die (dw_die_ref parent, dw_die_ref child)
child = tmp; child = tmp;
} }
if (child->die_parent != parent gcc_assert (child->die_parent == parent
&& child->die_parent != get_AT_ref (parent, DW_AT_specification)) || (child->die_parent
abort (); == get_AT_ref (parent, DW_AT_specification)));
for (p = &(child->die_parent->die_child); *p; p = &((*p)->die_sib)) for (p = &(child->die_parent->die_child); *p; p = &((*p)->die_sib))
if (*p == child) if (*p == child)
...@@ -5778,15 +5731,8 @@ attr_checksum (dw_attr_ref at, struct md5_ctx *ctx, int *mark) ...@@ -5778,15 +5731,8 @@ attr_checksum (dw_attr_ref at, struct md5_ctx *ctx, int *mark)
case dw_val_class_addr: case dw_val_class_addr:
r = AT_addr (at); r = AT_addr (at);
switch (GET_CODE (r)) gcc_assert (GET_CODE (r) == SYMBOL_REF);
{ CHECKSUM_STRING (XSTR (r, 0));
case SYMBOL_REF:
CHECKSUM_STRING (XSTR (r, 0));
break;
default:
abort ();
}
break; break;
case dw_val_class_offset: case dw_val_class_offset:
...@@ -5886,14 +5832,8 @@ same_dw_val_p (dw_val_node *v1, dw_val_node *v2, int *mark) ...@@ -5886,14 +5832,8 @@ same_dw_val_p (dw_val_node *v1, dw_val_node *v2, int *mark)
r2 = v2->v.val_addr; r2 = v2->v.val_addr;
if (GET_CODE (r1) != GET_CODE (r2)) if (GET_CODE (r1) != GET_CODE (r2))
return 0; return 0;
switch (GET_CODE (r1)) gcc_assert (GET_CODE (r1) == SYMBOL_REF);
{ return !strcmp (XSTR (r1, 0), XSTR (r2, 0));
case SYMBOL_REF:
return !strcmp (XSTR (r1, 0), XSTR (r2, 0));
default:
abort ();
}
case dw_val_class_offset: case dw_val_class_offset:
return v1->v.val_offset == v2->v.val_offset; return v1->v.val_offset == v2->v.val_offset;
...@@ -6269,8 +6209,7 @@ break_out_includes (dw_die_ref die) ...@@ -6269,8 +6209,7 @@ break_out_includes (dw_die_ref die)
#if 0 #if 0
/* We can only use this in debugging, since the frontend doesn't check /* We can only use this in debugging, since the frontend doesn't check
to make sure that we leave every include file we enter. */ to make sure that we leave every include file we enter. */
if (unit != NULL) gcc_assert (!unit);
abort ();
#endif #endif
assign_symbol_names (die); assign_symbol_names (die);
...@@ -6351,8 +6290,7 @@ build_abbrev_table (dw_die_ref die) ...@@ -6351,8 +6290,7 @@ build_abbrev_table (dw_die_ref die)
if (AT_class (d_attr) == dw_val_class_die_ref if (AT_class (d_attr) == dw_val_class_die_ref
&& AT_ref (d_attr)->die_mark == 0) && AT_ref (d_attr)->die_mark == 0)
{ {
if (AT_ref (d_attr)->die_symbol == 0) gcc_assert (AT_ref (d_attr)->die_symbol);
abort ();
set_AT_ref_external (d_attr, 1); set_AT_ref_external (d_attr, 1);
} }
...@@ -6497,7 +6435,7 @@ size_of_die (dw_die_ref die) ...@@ -6497,7 +6435,7 @@ size_of_die (dw_die_ref die)
size += strlen (a->dw_attr_val.v.val_str->str) + 1; size += strlen (a->dw_attr_val.v.val_str->str) + 1;
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -6535,8 +6473,7 @@ mark_dies (dw_die_ref die) ...@@ -6535,8 +6473,7 @@ mark_dies (dw_die_ref die)
{ {
dw_die_ref c; dw_die_ref c;
if (die->die_mark) gcc_assert (!die->die_mark);
abort ();
die->die_mark = 1; die->die_mark = 1;
for (c = die->die_child; c; c = c->die_sib) for (c = die->die_child; c; c = c->die_sib)
...@@ -6550,8 +6487,7 @@ unmark_dies (dw_die_ref die) ...@@ -6550,8 +6487,7 @@ unmark_dies (dw_die_ref die)
{ {
dw_die_ref c; dw_die_ref c;
if (!die->die_mark) gcc_assert (die->die_mark);
abort ();
die->die_mark = 0; die->die_mark = 0;
for (c = die->die_child; c; c = c->die_sib) for (c = die->die_child; c; c = c->die_sib)
...@@ -6627,11 +6563,15 @@ value_format (dw_attr_ref a) ...@@ -6627,11 +6563,15 @@ value_format (dw_attr_ref a)
return DW_FORM_addr; return DW_FORM_addr;
case dw_val_class_range_list: case dw_val_class_range_list:
case dw_val_class_offset: case dw_val_class_offset:
if (DWARF_OFFSET_SIZE == 4) switch (DWARF_OFFSET_SIZE)
return DW_FORM_data4; {
if (DWARF_OFFSET_SIZE == 8) case 4:
return DW_FORM_data8; return DW_FORM_data4;
abort (); case 8:
return DW_FORM_data8;
default:
gcc_unreachable ();
}
case dw_val_class_loc_list: case dw_val_class_loc_list:
/* FIXME: Could be DW_FORM_data8, with a > 32 bit size /* FIXME: Could be DW_FORM_data8, with a > 32 bit size
.debug_loc section */ .debug_loc section */
...@@ -6644,7 +6584,7 @@ value_format (dw_attr_ref a) ...@@ -6644,7 +6584,7 @@ value_format (dw_attr_ref a)
case 2: case 2:
return DW_FORM_block2; return DW_FORM_block2;
default: default:
abort (); gcc_unreachable ();
} }
case dw_val_class_const: case dw_val_class_const:
return DW_FORM_sdata; return DW_FORM_sdata;
...@@ -6660,7 +6600,7 @@ value_format (dw_attr_ref a) ...@@ -6660,7 +6600,7 @@ value_format (dw_attr_ref a)
case 8: case 8:
return DW_FORM_data8; return DW_FORM_data8;
default: default:
abort (); gcc_unreachable ();
} }
case dw_val_class_long_long: case dw_val_class_long_long:
return DW_FORM_block1; return DW_FORM_block1;
...@@ -6683,7 +6623,7 @@ value_format (dw_attr_ref a) ...@@ -6683,7 +6623,7 @@ value_format (dw_attr_ref a)
return AT_string_form (a); return AT_string_form (a);
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -6826,8 +6766,7 @@ output_loc_list (dw_loc_list_ref list_head) ...@@ -6826,8 +6766,7 @@ output_loc_list (dw_loc_list_ref list_head)
size = size_of_locs (curr->expr); size = size_of_locs (curr->expr);
/* Output the block length for this list of location operations. */ /* Output the block length for this list of location operations. */
if (size > 0xffff) gcc_assert (size <= 0xffff);
abort ();
dw2_asm_output_data (2, size, "%s", "Location expression size"); dw2_asm_output_data (2, size, "%s", "Location expression size");
output_loc_sequence (curr->expr); output_loc_sequence (curr->expr);
...@@ -6962,8 +6901,7 @@ output_die (dw_die_ref die) ...@@ -6962,8 +6901,7 @@ output_die (dw_die_ref die)
{ {
char *sym = AT_loc_list (a)->ll_symbol; char *sym = AT_loc_list (a)->ll_symbol;
if (sym == 0) gcc_assert (sym);
abort ();
dw2_asm_output_offset (DWARF_OFFSET_SIZE, sym, "%s", name); dw2_asm_output_offset (DWARF_OFFSET_SIZE, sym, "%s", name);
} }
break; break;
...@@ -6973,15 +6911,15 @@ output_die (dw_die_ref die) ...@@ -6973,15 +6911,15 @@ output_die (dw_die_ref die)
{ {
char *sym = AT_ref (a)->die_symbol; char *sym = AT_ref (a)->die_symbol;
if (sym == 0) gcc_assert (sym);
abort ();
dw2_asm_output_offset (DWARF2_ADDR_SIZE, sym, "%s", name); dw2_asm_output_offset (DWARF2_ADDR_SIZE, sym, "%s", name);
} }
else if (AT_ref (a)->die_offset == 0)
abort ();
else else
dw2_asm_output_data (DWARF_OFFSET_SIZE, AT_ref (a)->die_offset, {
"%s", name); gcc_assert (AT_ref (a)->die_offset);
dw2_asm_output_data (DWARF_OFFSET_SIZE, AT_ref (a)->die_offset,
"%s", name);
}
break; break;
case dw_val_class_fde_ref: case dw_val_class_fde_ref:
...@@ -7012,7 +6950,7 @@ output_die (dw_die_ref die) ...@@ -7012,7 +6950,7 @@ output_die (dw_die_ref die)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -7155,8 +7093,7 @@ output_pubnames (void) ...@@ -7155,8 +7093,7 @@ output_pubnames (void)
pubname_ref pub = &pubname_table[i]; pubname_ref pub = &pubname_table[i];
/* We shouldn't see pubnames for DIEs outside of the main CU. */ /* We shouldn't see pubnames for DIEs outside of the main CU. */
if (pub->die->die_mark == 0) gcc_assert (pub->die->die_mark);
abort ();
dw2_asm_output_data (DWARF_OFFSET_SIZE, pub->die->die_offset, dw2_asm_output_data (DWARF_OFFSET_SIZE, pub->die->die_offset,
"DIE offset"); "DIE offset");
...@@ -7229,8 +7166,7 @@ output_aranges (void) ...@@ -7229,8 +7166,7 @@ output_aranges (void)
dw_die_ref die = arange_table[i]; dw_die_ref die = arange_table[i];
/* We shouldn't see aranges for DIEs outside of the main CU. */ /* We shouldn't see aranges for DIEs outside of the main CU. */
if (die->die_mark == 0) gcc_assert (die->die_mark);
abort ();
if (die->die_tag == DW_TAG_subprogram) if (die->die_tag == DW_TAG_subprogram)
{ {
...@@ -7247,12 +7183,10 @@ output_aranges (void) ...@@ -7247,12 +7183,10 @@ output_aranges (void)
dw_attr_ref a = get_AT (die, DW_AT_location); dw_attr_ref a = get_AT (die, DW_AT_location);
dw_loc_descr_ref loc; dw_loc_descr_ref loc;
if (! a || AT_class (a) != dw_val_class_loc) gcc_assert (a && AT_class (a) == dw_val_class_loc);
abort ();
loc = AT_loc (a); loc = AT_loc (a);
if (loc->dw_loc_opc != DW_OP_addr) gcc_assert (loc->dw_loc_opc == DW_OP_addr);
abort ();
dw2_asm_output_addr_rtx (DWARF2_ADDR_SIZE, dw2_asm_output_addr_rtx (DWARF2_ADDR_SIZE,
loc->dw_loc_oprnd1.v.val_addr, "Address"); loc->dw_loc_oprnd1.v.val_addr, "Address");
...@@ -8007,7 +7941,7 @@ base_type_die (tree type) ...@@ -8007,7 +7941,7 @@ base_type_die (tree type)
default: default:
/* No other TREE_CODEs are Dwarf fundamental types. */ /* No other TREE_CODEs are Dwarf fundamental types. */
abort (); gcc_unreachable ();
} }
base_type_result = new_die (DW_TAG_base_type, comp_unit_die, type); base_type_result = new_die (DW_TAG_base_type, comp_unit_die, type);
...@@ -8085,7 +8019,7 @@ is_base_type (tree type) ...@@ -8085,7 +8019,7 @@ is_base_type (tree type)
return 0; return 0;
default: default:
abort (); gcc_unreachable ();
} }
return 0; return 0;
...@@ -8323,8 +8257,7 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type, ...@@ -8323,8 +8257,7 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
/* Vectors have the debugging information in the type, /* Vectors have the debugging information in the type,
not the main variant. */ not the main variant. */
mod_type_die = lookup_type_die (type); mod_type_die = lookup_type_die (type);
if (mod_type_die == NULL) gcc_assert (mod_type_die);
abort ();
} }
/* We want to equate the qualified type to the die below. */ /* We want to equate the qualified type to the die below. */
...@@ -8365,8 +8298,7 @@ dbx_reg_number (rtx rtl) ...@@ -8365,8 +8298,7 @@ dbx_reg_number (rtx rtl)
{ {
unsigned regno = REGNO (rtl); unsigned regno = REGNO (rtl);
if (regno >= FIRST_PSEUDO_REGISTER) gcc_assert (regno < FIRST_PSEUDO_REGISTER);
abort ();
return DBX_REGISTER_NUMBER (regno); return DBX_REGISTER_NUMBER (regno);
} }
...@@ -8438,8 +8370,7 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs) ...@@ -8438,8 +8370,7 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs)
/* Now onto stupid register sets in non contiguous locations. */ /* Now onto stupid register sets in non contiguous locations. */
if (GET_CODE (regs) != PARALLEL) gcc_assert (GET_CODE (regs) == PARALLEL);
abort ();
size = GET_MODE_SIZE (GET_MODE (XVECEXP (regs, 0, 0))); size = GET_MODE_SIZE (GET_MODE (XVECEXP (regs, 0, 0)));
loc_result = NULL; loc_result = NULL;
...@@ -8734,7 +8665,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg) ...@@ -8734,7 +8665,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
return mem_loc_result; return mem_loc_result;
...@@ -8844,7 +8775,7 @@ loc_descriptor (rtx rtl, bool can_use_fbreg) ...@@ -8844,7 +8775,7 @@ loc_descriptor (rtx rtl, bool can_use_fbreg)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
return loc_result; return loc_result;
...@@ -9247,7 +9178,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address) ...@@ -9247,7 +9178,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
/* Otherwise this is a generic code; we should just lists all of /* Otherwise this is a generic code; we should just lists all of
these explicitly. Aborting means we forgot one. */ these explicitly. Aborting means we forgot one. */
abort (); gcc_unreachable ();
#else #else
/* In a release build, we want to degrade gracefully: better to /* In a release build, we want to degrade gracefully: better to
generate incomplete debugging information than to crash. */ generate incomplete debugging information than to crash. */
...@@ -9350,8 +9281,8 @@ field_byte_offset (tree decl) ...@@ -9350,8 +9281,8 @@ field_byte_offset (tree decl)
if (TREE_CODE (decl) == ERROR_MARK) if (TREE_CODE (decl) == ERROR_MARK)
return 0; return 0;
else if (TREE_CODE (decl) != FIELD_DECL)
abort (); gcc_assert (TREE_CODE (decl) == FIELD_DECL);
type = field_type (decl); type = field_type (decl);
field_size_tree = DECL_SIZE (decl); field_size_tree = DECL_SIZE (decl);
...@@ -9513,8 +9444,7 @@ add_data_member_location_attribute (dw_die_ref die, tree decl) ...@@ -9513,8 +9444,7 @@ add_data_member_location_attribute (dw_die_ref die, tree decl)
/* Calculate the address of the offset. */ /* Calculate the address of the offset. */
offset = tree_low_cst (BINFO_VPTR_FIELD (decl), 0); offset = tree_low_cst (BINFO_VPTR_FIELD (decl), 0);
if (offset >= 0) gcc_assert (offset < 0);
abort ();
tmp = int_loc_descriptor (-offset); tmp = int_loc_descriptor (-offset);
add_loc_descr (&loc_descr, tmp); add_loc_descr (&loc_descr, tmp);
...@@ -9649,8 +9579,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl) ...@@ -9649,8 +9579,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
else else
{ {
/* ??? We really should be using HOST_WIDE_INT throughout. */ /* ??? We really should be using HOST_WIDE_INT throughout. */
if (HOST_BITS_PER_LONG != HOST_BITS_PER_WIDE_INT) gcc_assert (HOST_BITS_PER_LONG == HOST_BITS_PER_WIDE_INT);
abort ();
add_AT_long_long (die, DW_AT_const_value, add_AT_long_long (die, DW_AT_const_value,
CONST_DOUBLE_HIGH (rtl), CONST_DOUBLE_LOW (rtl)); CONST_DOUBLE_HIGH (rtl), CONST_DOUBLE_LOW (rtl));
...@@ -9667,32 +9596,38 @@ add_const_value_attribute (dw_die_ref die, rtx rtl) ...@@ -9667,32 +9596,38 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
unsigned int i; unsigned int i;
unsigned char *p; unsigned char *p;
if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT) switch (GET_MODE_CLASS (mode))
{ {
case MODE_VECTOR_INT:
for (i = 0, p = array; i < length; i++, p += elt_size) for (i = 0, p = array; i < length; i++, p += elt_size)
{ {
rtx elt = CONST_VECTOR_ELT (rtl, i); rtx elt = CONST_VECTOR_ELT (rtl, i);
HOST_WIDE_INT lo, hi; HOST_WIDE_INT lo, hi;
if (GET_CODE (elt) == CONST_INT)
switch (GET_CODE (elt))
{ {
case CONST_INT:
lo = INTVAL (elt); lo = INTVAL (elt);
hi = -(lo < 0); hi = -(lo < 0);
} break;
else if (GET_CODE (elt) == CONST_DOUBLE)
{ case CONST_DOUBLE:
lo = CONST_DOUBLE_LOW (elt); lo = CONST_DOUBLE_LOW (elt);
hi = CONST_DOUBLE_HIGH (elt); hi = CONST_DOUBLE_HIGH (elt);
break;
default:
gcc_unreachable ();
} }
else
abort ();
if (elt_size <= sizeof (HOST_WIDE_INT)) if (elt_size <= sizeof (HOST_WIDE_INT))
insert_int (lo, elt_size, p); insert_int (lo, elt_size, p);
else if (elt_size == 2 * sizeof (HOST_WIDE_INT)) else
{ {
unsigned char *p0 = p; unsigned char *p0 = p;
unsigned char *p1 = p + sizeof (HOST_WIDE_INT); unsigned char *p1 = p + sizeof (HOST_WIDE_INT);
gcc_assert (elt_size == 2 * sizeof (HOST_WIDE_INT));
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
{ {
p0 = p1; p0 = p1;
...@@ -9701,20 +9636,20 @@ add_const_value_attribute (dw_die_ref die, rtx rtl) ...@@ -9701,20 +9636,20 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
insert_int (lo, sizeof (HOST_WIDE_INT), p0); insert_int (lo, sizeof (HOST_WIDE_INT), p0);
insert_int (hi, sizeof (HOST_WIDE_INT), p1); insert_int (hi, sizeof (HOST_WIDE_INT), p1);
} }
else
abort ();
} }
} break;
else if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
{ case MODE_VECTOR_FLOAT:
for (i = 0, p = array; i < length; i++, p += elt_size) for (i = 0, p = array; i < length; i++, p += elt_size)
{ {
rtx elt = CONST_VECTOR_ELT (rtl, i); rtx elt = CONST_VECTOR_ELT (rtl, i);
insert_float (elt, p); insert_float (elt, p);
} }
break;
default:
gcc_unreachable ();
} }
else
abort ();
add_AT_vec (die, DW_AT_const_value, length, elt_size, array); add_AT_vec (die, DW_AT_const_value, length, elt_size, array);
} }
...@@ -9747,7 +9682,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl) ...@@ -9747,7 +9682,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
default: default:
/* No other kinds of rtx should be possible here. */ /* No other kinds of rtx should be possible here. */
abort (); gcc_unreachable ();
} }
} }
...@@ -9963,8 +9898,7 @@ rtl_for_decl_location (tree decl) ...@@ -9963,8 +9898,7 @@ rtl_for_decl_location (tree decl)
rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode, rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode,
EXPAND_INITIALIZER); EXPAND_INITIALIZER);
/* If expand_expr returns a MEM, it wasn't immediate. */ /* If expand_expr returns a MEM, it wasn't immediate. */
if (rtl && MEM_P (rtl)) gcc_assert (!rtl || !MEM_P (rtl));
abort ();
} }
} }
...@@ -10001,9 +9935,9 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl, ...@@ -10001,9 +9935,9 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl,
if (TREE_CODE (decl) == ERROR_MARK) if (TREE_CODE (decl) == ERROR_MARK)
return; return;
else if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != PARM_DECL
&& TREE_CODE (decl) != RESULT_DECL) gcc_assert (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL
abort (); || TREE_CODE (decl) == RESULT_DECL);
/* See if we possibly have multiple locations for this variable. */ /* See if we possibly have multiple locations for this variable. */
loc_list = lookup_decl_loc (decl); loc_list = lookup_decl_loc (decl);
...@@ -10344,7 +10278,7 @@ add_byte_size_attribute (dw_die_ref die, tree tree_node) ...@@ -10344,7 +10278,7 @@ add_byte_size_attribute (dw_die_ref die, tree tree_node)
size = simple_type_size_in_bits (field_type (tree_node)) / BITS_PER_UNIT; size = simple_type_size_in_bits (field_type (tree_node)) / BITS_PER_UNIT;
break; break;
default: default:
abort (); gcc_unreachable ();
} }
/* Note that `size' might be -1 when we get to this point. If it is, that /* Note that `size' might be -1 when we get to this point. If it is, that
...@@ -10381,9 +10315,7 @@ add_bit_offset_attribute (dw_die_ref die, tree decl) ...@@ -10381,9 +10315,7 @@ add_bit_offset_attribute (dw_die_ref die, tree decl)
HOST_WIDE_INT unsigned bit_offset; HOST_WIDE_INT unsigned bit_offset;
/* Must be a field and a bit field. */ /* Must be a field and a bit field. */
if (!type gcc_assert (type && TREE_CODE (decl) == FIELD_DECL);
|| TREE_CODE (decl) != FIELD_DECL)
abort ();
/* We can't yet handle bit-fields whose offsets are variable, so if we /* We can't yet handle bit-fields whose offsets are variable, so if we
encounter such things, just return without generating any attribute encounter such things, just return without generating any attribute
...@@ -10423,9 +10355,8 @@ static inline void ...@@ -10423,9 +10355,8 @@ static inline void
add_bit_size_attribute (dw_die_ref die, tree decl) add_bit_size_attribute (dw_die_ref die, tree decl)
{ {
/* Must be a field and a bit field. */ /* Must be a field and a bit field. */
if (TREE_CODE (decl) != FIELD_DECL gcc_assert (TREE_CODE (decl) == FIELD_DECL
|| ! DECL_BIT_FIELD_TYPE (decl)) && DECL_BIT_FIELD_TYPE (decl));
abort ();
if (host_integerp (DECL_SIZE (decl), 1)) if (host_integerp (DECL_SIZE (decl), 1))
add_AT_unsigned (die, DW_AT_bit_size, tree_low_cst (DECL_SIZE (decl), 1)); add_AT_unsigned (die, DW_AT_bit_size, tree_low_cst (DECL_SIZE (decl), 1));
...@@ -10474,8 +10405,7 @@ add_abstract_origin_attribute (dw_die_ref die, tree origin) ...@@ -10474,8 +10405,7 @@ add_abstract_origin_attribute (dw_die_ref die, tree origin)
else if (TYPE_P (origin)) else if (TYPE_P (origin))
origin_die = lookup_type_die (origin); origin_die = lookup_type_die (origin);
if (origin_die == NULL) gcc_assert (origin_die);
abort ();
add_AT_die_ref (die, DW_AT_abstract_origin, origin_die); add_AT_die_ref (die, DW_AT_abstract_origin, origin_die);
} }
...@@ -10562,8 +10492,7 @@ push_decl_scope (tree scope) ...@@ -10562,8 +10492,7 @@ push_decl_scope (tree scope)
static inline void static inline void
pop_decl_scope (void) pop_decl_scope (void)
{ {
if (VARRAY_ACTIVE_SIZE (decl_scope_table) <= 0) gcc_assert (VARRAY_ACTIVE_SIZE (decl_scope_table) > 0);
abort ();
VARRAY_POP (decl_scope_table); VARRAY_POP (decl_scope_table);
} }
...@@ -10582,8 +10511,7 @@ scope_die_for (tree t, dw_die_ref context_die) ...@@ -10582,8 +10511,7 @@ scope_die_for (tree t, dw_die_ref context_die)
int i; int i;
/* Non-types always go in the current scope. */ /* Non-types always go in the current scope. */
if (! TYPE_P (t)) gcc_assert (TYPE_P (t));
abort ();
containing_scope = TYPE_CONTEXT (t); containing_scope = TYPE_CONTEXT (t);
...@@ -10615,9 +10543,8 @@ scope_die_for (tree t, dw_die_ref context_die) ...@@ -10615,9 +10543,8 @@ scope_die_for (tree t, dw_die_ref context_die)
if (i < 0) if (i < 0)
{ {
if (debug_info_level > DINFO_LEVEL_TERSE gcc_assert (debug_info_level <= DINFO_LEVEL_TERSE
&& !TREE_ASM_WRITTEN (containing_scope)) || TREE_ASM_WRITTEN (containing_scope));
abort ();
/* If none of the current dies are suitable, we get file scope. */ /* If none of the current dies are suitable, we get file scope. */
scope_die = comp_unit_die; scope_die = comp_unit_die;
...@@ -10744,12 +10671,10 @@ decl_start_label (tree decl) ...@@ -10744,12 +10671,10 @@ decl_start_label (tree decl)
const char *fnname; const char *fnname;
x = DECL_RTL (decl); x = DECL_RTL (decl);
if (!MEM_P (x)) gcc_assert (MEM_P (x));
abort ();
x = XEXP (x, 0); x = XEXP (x, 0);
if (GET_CODE (x) != SYMBOL_REF) gcc_assert (GET_CODE (x) == SYMBOL_REF);
abort ();
fnname = XSTR (x, 0); fnname = XSTR (x, 0);
return fnname; return fnname;
...@@ -11018,7 +10943,7 @@ gen_formal_parameter_die (tree node, dw_die_ref context_die) ...@@ -11018,7 +10943,7 @@ gen_formal_parameter_die (tree node, dw_die_ref context_die)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
return parm_die; return parm_die;
...@@ -11107,8 +11032,7 @@ gen_type_die_for_member (tree type, tree member, dw_die_ref context_die) ...@@ -11107,8 +11032,7 @@ gen_type_die_for_member (tree type, tree member, dw_die_ref context_die)
if (TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type)) if (TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type))
&& ! lookup_decl_die (member)) && ! lookup_decl_die (member))
{ {
if (decl_ultimate_origin (member)) gcc_assert (!decl_ultimate_origin (member));
abort ();
push_decl_scope (type); push_decl_scope (type);
if (TREE_CODE (member) == FUNCTION_DECL) if (TREE_CODE (member) == FUNCTION_DECL)
...@@ -11187,14 +11111,12 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) ...@@ -11187,14 +11111,12 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
if (origin && declaration && class_or_namespace_scope_p (context_die)) if (origin && declaration && class_or_namespace_scope_p (context_die))
{ {
origin = NULL; origin = NULL;
if (old_die) gcc_assert (!old_die);
abort ();
} }
if (origin != NULL) if (origin != NULL)
{ {
if (declaration && ! local_scope_p (context_die)) gcc_assert (!declaration || local_scope_p (context_die));
abort ();
/* Fixup die_parent for the abstract instance of a nested /* Fixup die_parent for the abstract instance of a nested
inline function. */ inline function. */
...@@ -11220,9 +11142,8 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) ...@@ -11220,9 +11142,8 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
we should detect this case and ignore it. For now, if we have we should detect this case and ignore it. For now, if we have
already reported an error, any error at all, then assume that already reported an error, any error at all, then assume that
we got here because of an input error, not a dwarf2 bug. */ we got here because of an input error, not a dwarf2 bug. */
if (errorcount) gcc_assert (errorcount);
return; return;
abort ();
} }
/* If the definition comes from the same place as the declaration, /* If the definition comes from the same place as the declaration,
...@@ -11563,8 +11484,7 @@ gen_label_die (tree decl, dw_die_ref context_die) ...@@ -11563,8 +11484,7 @@ gen_label_die (tree decl, dw_die_ref context_die)
represent source-level labels which were explicitly declared by represent source-level labels which were explicitly declared by
the user. This really shouldn't be happening though, so catch the user. This really shouldn't be happening though, so catch
it if it ever does happen. */ it if it ever does happen. */
if (INSN_DELETED_P (insn)) gcc_assert (!INSN_DELETED_P (insn));
abort ();
ASM_GENERATE_INTERNAL_LABEL (label, "L", CODE_LABEL_NUMBER (insn)); ASM_GENERATE_INTERNAL_LABEL (label, "L", CODE_LABEL_NUMBER (insn));
add_AT_lbl_id (lbl_die, DW_AT_low_pc, label); add_AT_lbl_id (lbl_die, DW_AT_low_pc, label);
...@@ -12022,10 +11942,8 @@ gen_typedef_die (tree decl, dw_die_ref context_die) ...@@ -12022,10 +11942,8 @@ gen_typedef_die (tree decl, dw_die_ref context_die)
{ {
type = DECL_ORIGINAL_TYPE (decl); type = DECL_ORIGINAL_TYPE (decl);
if (type == TREE_TYPE (decl)) gcc_assert (type != TREE_TYPE (decl));
abort (); equate_type_number_to_die (TREE_TYPE (decl), type_die);
else
equate_type_number_to_die (TREE_TYPE (decl), type_die);
} }
else else
type = TREE_TYPE (decl); type = TREE_TYPE (decl);
...@@ -12055,8 +11973,7 @@ gen_type_die (tree type, dw_die_ref context_die) ...@@ -12055,8 +11973,7 @@ gen_type_die (tree type, dw_die_ref context_die)
return; return;
/* Prevent broken recursion; we can't hand off to the same type. */ /* Prevent broken recursion; we can't hand off to the same type. */
if (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) == type) gcc_assert (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) != type);
abort ();
TREE_ASM_WRITTEN (type) = 1; TREE_ASM_WRITTEN (type) = 1;
gen_decl_die (TYPE_NAME (type), context_die); gen_decl_die (TYPE_NAME (type), context_die);
...@@ -12113,7 +12030,8 @@ gen_type_die (tree type, dw_die_ref context_die) ...@@ -12113,7 +12030,8 @@ gen_type_die (tree type, dw_die_ref context_die)
case FILE_TYPE: case FILE_TYPE:
gen_type_die (TREE_TYPE (type), context_die); gen_type_die (TREE_TYPE (type), context_die);
abort (); /* No way to represent these in Dwarf yet! */ /* No way to represent these in Dwarf yet! */
gcc_unreachable ();
break; break;
case FUNCTION_TYPE: case FUNCTION_TYPE:
...@@ -12199,7 +12117,7 @@ gen_type_die (tree type, dw_die_ref context_die) ...@@ -12199,7 +12117,7 @@ gen_type_die (tree type, dw_die_ref context_die)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
TREE_ASM_WRITTEN (type) = 1; TREE_ASM_WRITTEN (type) = 1;
...@@ -12217,8 +12135,7 @@ gen_tagged_type_instantiation_die (tree type, dw_die_ref context_die) ...@@ -12217,8 +12135,7 @@ gen_tagged_type_instantiation_die (tree type, dw_die_ref context_die)
this type (i.e. without any const or volatile qualifiers) so make sure this type (i.e. without any const or volatile qualifiers) so make sure
that we have the main variant (i.e. the unqualified version) of this that we have the main variant (i.e. the unqualified version) of this
type now. */ type now. */
if (type != type_main_variant (type)) gcc_assert (type == type_main_variant (type));
abort ();
/* Do not check TREE_ASM_WRITTEN (type) as it may not be set if this is /* Do not check TREE_ASM_WRITTEN (type) as it may not be set if this is
an instance of an unresolved type. */ an instance of an unresolved type. */
...@@ -12242,7 +12159,7 @@ gen_tagged_type_instantiation_die (tree type, dw_die_ref context_die) ...@@ -12242,7 +12159,7 @@ gen_tagged_type_instantiation_die (tree type, dw_die_ref context_die)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -12453,15 +12370,14 @@ force_decl_die (tree decl) ...@@ -12453,15 +12370,14 @@ force_decl_die (tree decl)
break; break;
default: default:
abort (); gcc_unreachable ();
} }
/* See if we can find the die for this deci now. /* See if we can find the die for this deci now.
If not then abort. */ If not then abort. */
if (!decl_die) if (!decl_die)
decl_die = lookup_decl_die (decl); decl_die = lookup_decl_die (decl);
if (!decl_die) gcc_assert (decl_die);
abort ();
} }
return decl_die; return decl_die;
...@@ -12488,8 +12404,7 @@ force_type_die (tree type) ...@@ -12488,8 +12404,7 @@ force_type_die (tree type)
gen_type_die (type, context_die); gen_type_die (type, context_die);
type_die = lookup_type_die (type); type_die = lookup_type_die (type);
if (!type_die) gcc_assert (type_die);
abort();
} }
return type_die; return type_die;
} }
...@@ -12726,10 +12641,9 @@ gen_decl_die (tree decl, dw_die_ref context_die) ...@@ -12726,10 +12641,9 @@ gen_decl_die (tree decl, dw_die_ref context_die)
break; break;
default: default:
if ((int)TREE_CODE (decl) > NUM_TREE_CODES) /* Probably some frontend-internal decl. Assume we don't care. */
/* Probably some frontend-internal decl. Assume we don't care. */ gcc_assert ((int)TREE_CODE (decl) > NUM_TREE_CODES);
break; break;
abort ();
} }
} }
...@@ -12791,8 +12705,7 @@ dwarf2out_imported_module_or_decl (tree decl, tree context) ...@@ -12791,8 +12705,7 @@ dwarf2out_imported_module_or_decl (tree decl, tree context)
if (debug_info_level <= DINFO_LEVEL_TERSE) if (debug_info_level <= DINFO_LEVEL_TERSE)
return; return;
if (!decl) gcc_assert (decl);
abort ();
/* To emit DW_TAG_imported_module or DW_TAG_imported_decl, we need two DIEs. /* To emit DW_TAG_imported_module or DW_TAG_imported_decl, we need two DIEs.
We need decl DIE for reference and scope die. First, get DIE for the decl We need decl DIE for reference and scope die. First, get DIE for the decl
...@@ -13523,8 +13436,8 @@ static void ...@@ -13523,8 +13436,8 @@ static void
prune_unused_types_prune (dw_die_ref die) prune_unused_types_prune (dw_die_ref die)
{ {
dw_die_ref c, p, n; dw_die_ref c, p, n;
if (!die->die_mark)
abort(); gcc_assert (die->die_mark);
p = NULL; p = NULL;
for (c = die->die_child; c; c = n) for (c = die->die_child; c; c = n)
...@@ -13623,7 +13536,6 @@ dwarf2out_finish (const char *filename) ...@@ -13623,7 +13536,6 @@ dwarf2out_finish (const char *filename)
if (die->die_parent == NULL) if (die->die_parent == NULL)
{ {
dw_die_ref origin = get_AT_ref (die, DW_AT_abstract_origin); dw_die_ref origin = get_AT_ref (die, DW_AT_abstract_origin);
tree context;
if (origin) if (origin)
add_child_die (origin->die_parent, die); add_child_die (origin->die_parent, die);
...@@ -13632,25 +13544,28 @@ dwarf2out_finish (const char *filename) ...@@ -13632,25 +13544,28 @@ dwarf2out_finish (const char *filename)
else if (errorcount > 0 || sorrycount > 0) else if (errorcount > 0 || sorrycount > 0)
/* It's OK to be confused by errors in the input. */ /* It's OK to be confused by errors in the input. */
add_child_die (comp_unit_die, die); add_child_die (comp_unit_die, die);
else if (node->created_for else
&& ((DECL_P (node->created_for)
&& (context = DECL_CONTEXT (node->created_for)))
|| (TYPE_P (node->created_for)
&& (context = TYPE_CONTEXT (node->created_for))))
&& TREE_CODE (context) == FUNCTION_DECL)
{ {
/* In certain situations, the lexical block containing a /* In certain situations, the lexical block containing a
nested function can be optimized away, which results nested function can be optimized away, which results
in the nested function die being orphaned. Likewise in the nested function die being orphaned. Likewise
with the return type of that nested function. Force with the return type of that nested function. Force
this to be a child of the containing function. */ this to be a child of the containing function. */
tree context = NULL_TREE;
gcc_assert (node->created_for);
if (DECL_P (node->created_for))
context = DECL_CONTEXT (node->created_for);
else if (TYPE_P (node->created_for))
context = TYPE_CONTEXT (node->created_for);
gcc_assert (context && TREE_CODE (context) == FUNCTION_DECL);
origin = lookup_decl_die (context); origin = lookup_decl_die (context);
if (! origin) gcc_assert (origin);
abort ();
add_child_die (origin, die); add_child_die (origin, die);
} }
else
abort ();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment