summaryrefslogtreecommitdiff
path: root/gcc/ggc-common.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-09 13:54:07 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-09 13:54:07 +0000
commit0d59b19dc2331e2fd6d3ce1d95d0d6c22263c282 (patch)
tree186a20ffec3fade2a9f7714afe4a71cd22d79511 /gcc/ggc-common.c
parentd447f9c8dd7ac560eafefb78fdfe0d4479a44d99 (diff)
downloadgcc-0d59b19dc2331e2fd6d3ce1d95d0d6c22263c282.tar.gz
* gcse.c (INSN_CUID, insert_set_in_table, find_avail_set,
cprop_insn, do_local_cprop, local_cprop_pass, find_bypass_set, process_insert_insn, insert_insn_end_bb, pre_insert_copy_insn, hoist_code, extract_mentioned_regs_helper, compute_store_table, insert_store): Use gcc_assert and gcc_unreachable. * ggc-common.c (ggc_splay_alloc, ggc_splay_dont_free, gt_pch_note_object, gt_pch_note_reorder, relocate_ptrs, ggc_record_overhead): Likewise. * ggc-page.c (alloc_page, free_page, ggc_set_mark, ggc_marked_p, init_ggc, ggc_push_context, ggc_recalculate_in_use_p, ggc_pop_context, clear_marks, validate_free_objects, ggc_pch_read): Likewise. * ggc-zone.c (ggc_allocated_p, free_chunk, ggc_set_mark, ggc_marked_p, ggc_get_size, init_ggc, destroy_ggc_zone, ggc_push_context, check_cookies, ggc_collect, ggc_print_statistics): Likewise. * gimple-low.c (lower_function_body, lower_stmt, lower_bind_expr): Likewise. * gimplify.c (gimple_tree_eq, push_gimplify_context, pop_gimplify_context, gimple_pop_condition, create_tmp_var, declare_tmp_vars, gimple_add_tmp_var, annotate_all_with_locus, mostly_copy_tree_r, gimplify_return_expr, gimplify_switch_expr, gimplify_case_label_expr, gimplify_exit_block_expr, canonicalize_component_ref, gimplify_compound_lval, gimplify_self_mod_expr, gimplify_call_expr, gimplify_init_ctor_eval, gimplify_init_constructor, gimplify_modify_expr, gimplify_save_expr, gimplify_target_expr, gimplify_expr, check_pointer_types_r, force_gimple_operand): Likewise. * global.c (global_alloc, build_insn_chain): Likewise. * graph.c (clean_graph_dump_file, finish_graph_dump_file): Likewise. gcov-io.c (gcov_open): Use GCOV_CHECK. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87240 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-common.c')
-rw-r--r--gcc/ggc-common.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index d2528c0eac2..ccda55c8c53 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -197,16 +197,14 @@ ggc_calloc (size_t s1, size_t s2)
void *
ggc_splay_alloc (int sz, void *nl)
{
- if (nl != NULL)
- abort ();
+ gcc_assert (!nl);
return ggc_alloc (sz);
}
void
ggc_splay_dont_free (void * x ATTRIBUTE_UNUSED, void *nl)
{
- if (nl != NULL)
- abort ();
+ gcc_assert (!nl);
}
/* Print statistics that are independent of the collector in use. */
@@ -266,9 +264,8 @@ gt_pch_note_object (void *obj, void *note_ptr_cookie,
INSERT);
if (*slot != NULL)
{
- if ((*slot)->note_ptr_fn != note_ptr_fn
- || (*slot)->note_ptr_cookie != note_ptr_cookie)
- abort ();
+ gcc_assert ((*slot)->note_ptr_fn == note_ptr_fn
+ && (*slot)->note_ptr_cookie == note_ptr_cookie);
return 0;
}
@@ -295,9 +292,7 @@ gt_pch_note_reorder (void *obj, void *note_ptr_cookie,
return;
data = htab_find_with_hash (saving_htab, obj, POINTER_HASH (obj));
- if (data == NULL
- || data->note_ptr_cookie != note_ptr_cookie)
- abort ();
+ gcc_assert (data && data->note_ptr_cookie == note_ptr_cookie);
data->reorder_fn = reorder_fn;
}
@@ -376,8 +371,7 @@ relocate_ptrs (void *ptr_p, void *state_p)
return;
result = htab_find_with_hash (saving_htab, *ptr, POINTER_HASH (*ptr));
- if (result == NULL)
- abort ();
+ gcc_assert (result);
*ptr = result->new_addr;
}
@@ -873,8 +867,7 @@ ggc_record_overhead (size_t allocated, size_t overhead, void *ptr,
if (!ptr_hash)
ptr_hash = htab_create (10, hash_ptr, eq_ptr, NULL);
slot = htab_find_slot_with_hash (ptr_hash, ptr, htab_hash_pointer (ptr), INSERT);
- if (*slot)
- abort ();
+ gcc_assert (!*slot);
*slot = p;
loc->times++;