This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Assertify p*.c


I've installed this patch that assertifies p*.c files and fixes some
uses of abort that have crept into the t*.c files.

booted & tested on i686-pc-linux-gnu both checked and unchecked.

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>

	* params.c (set_param_value): Use gcc_assert & gcc_unreachable.
	* passes.c (open_dump_file, rest_of_handle_final): Likewise.
	* postreload-gcse.c (expr_equiv_p, oprs_unchanged_p,
	hash_scan_set, reg_set_between_after_reload_p,
	reg_used_between_after_reload_p, get_avail_load_store_reg,
	eliminate_partially_redundant_load): Likewise.
	* postreload.c (reload_cse_simplify_set,
	reload_combine_note_use): Likewise.
	* predict.c (predict_insn, expected_value_to_br_prob,
	propagate_freq, expensive_function_p): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* profile.c (instrument_edges, instrument_values,
	compute_branch_probabilities, branch_prob, union_groups,
	tree_register_profile_hooks, rtl_register_profile_hooks): Likewise.
	* protoize.c (in_system_include_dir, file_could_be_converted,
	file_normally_convertible, gen_aux_info_file, seek_to_line,
	do_cleaning): Likewise.
	* tree-ssa-alias.c (collect_points_to_info_r): Likewise.
	* tree-ssa-ccp.c (execute_fold_all_builtins): Likewise.
	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.

Index: params.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/params.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 params.c
*** params.c	1 Dec 2004 16:46:24 -0000	1.11
--- params.c	3 Apr 2005 10:11:11 -0000
*************** set_param_value (const char *name, int v
*** 61,68 ****
    size_t i;
  
    /* Make sure nobody tries to set a parameter to an invalid value.  */
!   if (value == INVALID_PARAM_VAL)
!     abort ();
  
    /* Scan the parameter table to find a matching entry.  */
    for (i = 0; i < num_compiler_params; ++i)
--- 61,67 ----
    size_t i;
  
    /* Make sure nobody tries to set a parameter to an invalid value.  */
!   gcc_assert (value != INVALID_PARAM_VAL);
  
    /* Scan the parameter table to find a matching entry.  */
    for (i = 0; i < num_compiler_params; ++i)
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.79
diff -c -3 -p -r2.79 passes.c
*** passes.c	1 Apr 2005 03:42:44 -0000	2.79
--- passes.c	3 Apr 2005 10:11:15 -0000
*************** open_dump_file (enum tree_dump_index ind
*** 120,127 ****
  
    timevar_push (TV_DUMP);
  
!   if (dump_file != NULL || dump_file_name != NULL)
!     abort ();
  
    dump_file_name = get_dump_file_name (index);
    initializing_dump = !dump_initialized_p (index);
--- 120,126 ----
  
    timevar_push (TV_DUMP);
  
!   gcc_assert (!dump_file && !dump_file_name);
  
    dump_file_name = get_dump_file_name (index);
    initializing_dump = !dump_initialized_p (index);
*************** rest_of_handle_final (void)
*** 285,295 ****
         different from the DECL_NAME name used in the source file.  */
  
      x = DECL_RTL (current_function_decl);
!     if (!MEM_P (x))
!       abort ();
      x = XEXP (x, 0);
!     if (GET_CODE (x) != SYMBOL_REF)
!       abort ();
      fnname = XSTR (x, 0);
  
      assemble_start_function (current_function_decl, fnname);
--- 284,292 ----
         different from the DECL_NAME name used in the source file.  */
  
      x = DECL_RTL (current_function_decl);
!     gcc_assert (MEM_P (x));
      x = XEXP (x, 0);
!     gcc_assert (GET_CODE (x) == SYMBOL_REF);
      fnname = XSTR (x, 0);
  
      assemble_start_function (current_function_decl, fnname);
Index: postreload-gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/postreload-gcse.c,v
retrieving revision 2.11
diff -c -3 -p -r2.11 postreload-gcse.c
*** postreload-gcse.c	1 Apr 2005 03:42:44 -0000	2.11
--- postreload-gcse.c	3 Apr 2005 10:11:17 -0000
*************** expr_equiv_p (const void *exp1p, const v
*** 309,317 ****
    struct expr *exp1 = (struct expr *) exp1p;
    struct expr *exp2 = (struct expr *) exp2p;
    int equiv_p = exp_equiv_p (exp1->expr, exp2->expr, 0, true);
!   if (equiv_p
!       && exp1->hash != exp2->hash)
!     abort ();
    return equiv_p;
  }
  
--- 309,316 ----
    struct expr *exp1 = (struct expr *) exp1p;
    struct expr *exp2 = (struct expr *) exp2p;
    int equiv_p = exp_equiv_p (exp1->expr, exp2->expr, 0, true);
!   
!   gcc_assert (!equiv_p || exp1->hash == exp2->hash);
    return equiv_p;
  }
  
*************** oprs_unchanged_p (rtx x, rtx insn, bool 
*** 489,499 ****
    switch (code)
      {
      case REG:
- #ifdef ENABLE_CHECKING
        /* We are called after register allocation.  */
!       if (REGNO (x) >= FIRST_PSEUDO_REGISTER)
! 	abort ();
! #endif
        if (after_insn)
  	/* If the last CUID setting the insn is less than the CUID of
  	   INSN, then reg X is not changed in or after INSN.  */
--- 488,495 ----
    switch (code)
      {
      case REG:
        /* We are called after register allocation.  */
!       gcc_assert (REGNO (x) < FIRST_PSEUDO_REGISTER);
        if (after_insn)
  	/* If the last CUID setting the insn is less than the CUID of
  	   INSN, then reg X is not changed in or after INSN.  */
*************** hash_scan_set (rtx insn)
*** 741,751 ****
    if (JUMP_P (insn) || set_noop_p (pat))
      return;
  
- #ifdef ENABLE_CHEKCING
    /* We shouldn't have any EH_REGION notes post reload.  */
!   if (find_reg_note (insn, REG_EH_REGION, NULL_RTX))
!     abort ();
! #endif
  
    if (REG_P (dest))
      {
--- 737,744 ----
    if (JUMP_P (insn) || set_noop_p (pat))
      return;
  
    /* We shouldn't have any EH_REGION notes post reload.  */
!   gcc_assert (!find_reg_note (insn, REG_EH_REGION, NULL_RTX));
  
    if (REG_P (dest))
      {
*************** reg_set_between_after_reload_p (rtx reg,
*** 856,866 ****
  {
    rtx insn;
  
- #ifdef ENABLE_CHECKING
    /* We are called after register allocation.  */
!   if (!REG_P (reg) || REGNO (reg) >= FIRST_PSEUDO_REGISTER)
!     abort ();
! #endif
  
    if (from_insn == to_insn)
      return NULL_RTX;
--- 849,856 ----
  {
    rtx insn;
  
    /* We are called after register allocation.  */
!   gcc_assert (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER);
  
    if (from_insn == to_insn)
      return NULL_RTX;
*************** reg_used_between_after_reload_p (rtx reg
*** 893,903 ****
  {
    rtx insn;
  
- #ifdef ENABLE_CHECKING
    /* We are called after register allocation.  */
!   if (!REG_P (reg) || REGNO (reg) >= FIRST_PSEUDO_REGISTER)
!     abort ();
! #endif
  
    if (from_insn == to_insn)
      return NULL_RTX;
--- 883,890 ----
  {
    rtx insn;
  
    /* We are called after register allocation.  */
!   gcc_assert (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER);
  
    if (from_insn == to_insn)
      return NULL_RTX;
*************** reg_set_or_used_since_bb_start (rtx reg,
*** 947,957 ****
  static rtx
  get_avail_load_store_reg (rtx insn)
  {
!   if (REG_P (SET_DEST (PATTERN (insn))))  /* A load.  */
      return SET_DEST(PATTERN(insn));
!   if (REG_P (SET_SRC (PATTERN (insn))))  /* A store.  */
!     return SET_SRC (PATTERN (insn));
!   abort ();
  }
  
  /* Return nonzero if the predecessors of BB are "well behaved".  */
--- 934,948 ----
  static rtx
  get_avail_load_store_reg (rtx insn)
  {
!   if (REG_P (SET_DEST (PATTERN (insn))))
!     /* A load.  */
      return SET_DEST(PATTERN(insn));
!   else
!     {
!       /* A store.  */
!       gcc_assert (REG_P (SET_SRC (PATTERN (insn))));
!       return SET_SRC (PATTERN (insn));
!     }
  }
  
  /* Return nonzero if the predecessors of BB are "well behaved".  */
*************** eliminate_partially_redundant_load (basi
*** 1044,1051 ****
  	{
  	  /* Check if the loaded register is not used.  */
  	  avail_insn = a_occr->insn;
! 	  if (! (avail_reg = get_avail_load_store_reg (avail_insn)))
! 	    abort ();
  	  /* Make sure we can generate a move from register avail_reg to
  	     dest.  */
  	  extract_insn (gen_move_insn (copy_rtx (dest),
--- 1035,1043 ----
  	{
  	  /* Check if the loaded register is not used.  */
  	  avail_insn = a_occr->insn;
! 	  avail_reg = get_avail_load_store_reg (avail_insn);
! 	  gcc_assert (avail_reg);
! 	  
  	  /* Make sure we can generate a move from register avail_reg to
  	     dest.  */
  	  extract_insn (gen_move_insn (copy_rtx (dest),
*************** eliminate_partially_redundant_load (basi
*** 1116,1123 ****
        /* Set avail_reg to be the register having the value of the
  	 memory.  */
        avail_reg = get_avail_load_store_reg (avail_insn);
!       if (! avail_reg)
! 	abort ();
  
        insert_insn_on_edge (gen_move_insn (copy_rtx (dest),
  					  copy_rtx (avail_reg)),
--- 1108,1114 ----
        /* Set avail_reg to be the register having the value of the
  	 memory.  */
        avail_reg = get_avail_load_store_reg (avail_insn);
!       gcc_assert (avail_reg);
  
        insert_insn_on_edge (gen_move_insn (copy_rtx (dest),
  					  copy_rtx (avail_reg)),
Index: postreload.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/postreload.c,v
retrieving revision 2.28
diff -c -3 -p -r2.28 postreload.c
*** postreload.c	5 Mar 2005 17:25:32 -0000	2.28
--- postreload.c	3 Apr 2005 10:11:19 -0000
*************** reload_cse_simplify_set (rtx set, rtx in
*** 293,299 ****
  		  if (this_val == trunc_int_for_mode (this_val, GET_MODE (src)))
  		    break;
  		default:
! 		  abort ();
  		}
  	      this_rtx = GEN_INT (this_val);
  	    }
--- 293,299 ----
  		  if (this_val == trunc_int_for_mode (this_val, GET_MODE (src)))
  		    break;
  		default:
! 		  gcc_unreachable ();
  		}
  	      this_rtx = GEN_INT (this_val);
  	    }
*************** reload_combine_note_use (rtx *xp, rtx in
*** 1068,1075 ****
        if (REG_P (SET_DEST (x)))
  	{
  	  /* No spurious CLOBBERs of pseudo registers may remain.  */
! 	  if (REGNO (SET_DEST (x)) >= FIRST_PSEUDO_REGISTER)
! 	    abort ();
  	  return;
  	}
        break;
--- 1068,1074 ----
        if (REG_P (SET_DEST (x)))
  	{
  	  /* No spurious CLOBBERs of pseudo registers may remain.  */
! 	  gcc_assert (REGNO (SET_DEST (x)) < FIRST_PSEUDO_REGISTER);
  	  return;
  	}
        break;
*************** reload_combine_note_use (rtx *xp, rtx in
*** 1089,1096 ****
  	int nregs;
  
  	/* No spurious USEs of pseudo registers may remain.  */
! 	if (regno >= FIRST_PSEUDO_REGISTER)
! 	  abort ();
  
  	nregs = hard_regno_nregs[regno][GET_MODE (x)];
  
--- 1088,1094 ----
  	int nregs;
  
  	/* No spurious USEs of pseudo registers may remain.  */
! 	gcc_assert (regno < FIRST_PSEUDO_REGISTER);
  
  	nregs = hard_regno_nregs[regno][GET_MODE (x)];
  
Index: predict.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/predict.c,v
retrieving revision 1.143
diff -c -3 -p -r1.143 predict.c
*** predict.c	11 Mar 2005 09:05:05 -0000	1.143
--- predict.c	3 Apr 2005 10:11:23 -0000
*************** tree_predicted_by_p (basic_block bb, enu
*** 181,188 ****
  static void
  predict_insn (rtx insn, enum br_predictor predictor, int probability)
  {
!   if (!any_condjump_p (insn))
!     abort ();
    if (!flag_guess_branch_prob)
      return;
  
--- 181,187 ----
  static void
  predict_insn (rtx insn, enum br_predictor predictor, int probability)
  {
!   gcc_assert (any_condjump_p (insn));
    if (!flag_guess_branch_prob)
      return;
  
*************** expected_value_to_br_prob (void)
*** 1440,1447 ****
        cond = simplify_rtx (cond);
  
        /* Turn the condition into a scaled branch probability.  */
!       if (cond != const_true_rtx && cond != const0_rtx)
! 	abort ();
        predict_insn_def (insn, PRED_BUILTIN_EXPECT,
  		        cond == const_true_rtx ? TAKEN : NOT_TAKEN);
      }
--- 1439,1445 ----
        cond = simplify_rtx (cond);
  
        /* Turn the condition into a scaled branch probability.  */
!       gcc_assert (cond == const_true_rtx || cond == const0_rtx);
        predict_insn_def (insn, PRED_BUILTIN_EXPECT,
  		        cond == const_true_rtx ? TAKEN : NOT_TAKEN);
      }
*************** propagate_freq (struct loop *loop, bitma
*** 1610,1618 ****
  	{
  #ifdef ENABLE_CHECKING
  	  FOR_EACH_EDGE (e, ei, bb->preds)
! 	    if (bitmap_bit_p (tovisit, e->src->index)
! 		&& !(e->flags & EDGE_DFS_BACK))
! 	      abort ();
  #endif
  
  	  FOR_EACH_EDGE (e, ei, bb->preds)
--- 1608,1615 ----
  	{
  #ifdef ENABLE_CHECKING
  	  FOR_EACH_EDGE (e, ei, bb->preds)
! 	    gcc_assert (!bitmap_bit_p (tovisit, e->src->index)
! 			|| (e->flags & EDGE_DFS_BACK));
  #endif
  
  	  FOR_EACH_EDGE (e, ei, bb->preds)
*************** expensive_function_p (int threshold)
*** 1756,1763 ****
  
    /* We can not compute accurately for large thresholds due to scaled
       frequencies.  */
!   if (threshold > BB_FREQ_MAX)
!     abort ();
  
    /* Frequencies are out of range.  This either means that function contains
       internal loop executing more than BB_FREQ_MAX times or profile feedback
--- 1753,1759 ----
  
    /* We can not compute accurately for large thresholds due to scaled
       frequencies.  */
!   gcc_assert (threshold <= BB_FREQ_MAX);
  
    /* Frequencies are out of range.  This either means that function contains
       internal loop executing more than BB_FREQ_MAX times or profile feedback
Index: print-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/print-rtl.c,v
retrieving revision 1.120
diff -c -3 -p -r1.120 print-rtl.c
*** print-rtl.c	31 Mar 2005 14:59:51 -0000	1.120
--- print-rtl.c	3 Apr 2005 10:11:25 -0000
*************** print_rtx (rtx in_rtx)
*** 607,613 ****
  	  case LABEL_STATIC_ENTRY: fputs (" [entry]", outfile); break;
  	  case LABEL_GLOBAL_ENTRY: fputs (" [global entry]", outfile); break;
  	  case LABEL_WEAK_ENTRY: fputs (" [weak entry]", outfile); break;
! 	  default: abort();
  	}
        break;
  
--- 607,613 ----
  	  case LABEL_STATIC_ENTRY: fputs (" [entry]", outfile); break;
  	  case LABEL_GLOBAL_ENTRY: fputs (" [global entry]", outfile); break;
  	  case LABEL_WEAK_ENTRY: fputs (" [weak entry]", outfile); break;
! 	  default: gcc_unreachable ();
  	}
        break;
  
Index: profile.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/profile.c,v
retrieving revision 1.155
diff -c -3 -p -r1.155 profile.c
*** profile.c	29 Mar 2005 11:45:45 -0000	1.155
--- profile.c	3 Apr 2005 10:11:28 -0000
*************** instrument_edges (struct edge_list *el)
*** 150,157 ****
  
  	  if (!inf->ignore && !inf->on_tree)
  	    {
! 	      if (e->flags & EDGE_ABNORMAL)
! 		abort ();
  	      if (dump_file)
  		fprintf (dump_file, "Edge %d to %d instrumented%s\n",
  			 e->src->index, e->dest->index,
--- 150,156 ----
  
  	  if (!inf->ignore && !inf->on_tree)
  	    {
! 	      gcc_assert (!(e->flags & EDGE_ABNORMAL));
  	      if (dump_file)
  		fprintf (dump_file, "Edge %d to %d instrumented%s\n",
  			 e->src->index, e->dest->index,
*************** instrument_values (histogram_values valu
*** 197,203 ****
  	  break;
  
  	default:
! 	  abort ();
  	}
        if (!coverage_counter_alloc (t, hist->n_counters))
  	continue;
--- 196,202 ----
  	  break;
  
  	default:
! 	  gcc_unreachable ();
  	}
        if (!coverage_counter_alloc (t, hist->n_counters))
  	continue;
*************** instrument_values (histogram_values valu
*** 221,227 ****
  	  break;
  
  	default:
! 	  abort ();
  	}
      }
    VEC_free (histogram_value, values);
--- 220,226 ----
  	  break;
  
  	default:
! 	  gcc_unreachable ();
  	}
      }
    VEC_free (histogram_value, values);
*************** compute_branch_probabilities (void)
*** 430,437 ****
  		  /* Calculate count for remaining edge by conservation.  */
  		  total = bb->count - total;
  
! 		  if (! e)
! 		    abort ();
  		  EDGE_INFO (e)->count_valid = 1;
  		  e->count = total;
  		  bi->succ_count--;
--- 429,435 ----
  		  /* Calculate count for remaining edge by conservation.  */
  		  total = bb->count - total;
  
! 		  gcc_assert (e);
  		  EDGE_INFO (e)->count_valid = 1;
  		  e->count = total;
  		  bi->succ_count--;
*************** compute_branch_probabilities (void)
*** 458,465 ****
  		  /* Calculate count for remaining edge by conservation.  */
  		  total = bb->count - total + e->count;
  
! 		  if (! e)
! 		    abort ();
  		  EDGE_INFO (e)->count_valid = 1;
  		  e->count = total;
  		  bi->pred_count--;
--- 456,462 ----
  		  /* Calculate count for remaining edge by conservation.  */
  		  total = bb->count - total + e->count;
  
! 		  gcc_assert (e);
  		  EDGE_INFO (e)->count_valid = 1;
  		  e->count = total;
  		  bi->pred_count--;
*************** compute_branch_probabilities (void)
*** 481,488 ****
       succ and pred count of zero.  */
    FOR_EACH_BB (bb)
      {
!       if (BB_INFO (bb)->succ_count || BB_INFO (bb)->pred_count)
! 	abort ();
      }
  
    /* For every edge, calculate its branch probability and add a reg_note
--- 478,484 ----
       succ and pred count of zero.  */
    FOR_EACH_BB (bb)
      {
!       gcc_assert (!BB_INFO (bb)->succ_count && !BB_INFO (bb)->pred_count);
      }
  
    /* For every edge, calculate its branch probability and add a reg_note
*************** branch_prob (void)
*** 1116,1123 ****
  
        n_instrumented = instrument_edges (el);
  
!       if (n_instrumented != num_instrumented)
! 	abort ();
  
        if (flag_profile_values)
  	instrument_values (values);
--- 1112,1118 ----
  
        n_instrumented = instrument_edges (el);
  
!       gcc_assert (n_instrumented == num_instrumented);
  
        if (flag_profile_values)
  	instrument_values (values);
*************** union_groups (basic_block bb1, basic_blo
*** 1177,1184 ****
  
    /* ??? I don't have a place for the rank field.  OK.  Lets go w/o it,
       this code is unlikely going to be performance problem anyway.  */
!   if (bb1g == bb2g)
!     abort ();
  
    bb1g->aux = bb2g;
  }
--- 1172,1178 ----
  
    /* ??? I don't have a place for the rank field.  OK.  Lets go w/o it,
       this code is unlikely going to be performance problem anyway.  */
!   gcc_assert (bb1g != bb2g);
  
    bb1g->aux = bb2g;
  }
*************** end_branch_prob (void)
*** 1322,1330 ****
  void
  tree_register_profile_hooks (void)
  {
    profile_hooks = &tree_profile_hooks;
-   if (!ir_type ())
-     abort ();
  }
  
  /* Set up hooks to enable RTL-based profiling.  */
--- 1316,1323 ----
  void
  tree_register_profile_hooks (void)
  {
+   gcc_assert (ir_type ());
    profile_hooks = &tree_profile_hooks;
  }
  
  /* Set up hooks to enable RTL-based profiling.  */
*************** tree_register_profile_hooks (void)
*** 1332,1338 ****
  void
  rtl_register_profile_hooks (void)
  {
    profile_hooks = &rtl_profile_hooks;
-   if (ir_type ())
-     abort ();
  }
--- 1325,1330 ----
  void
  rtl_register_profile_hooks (void)
  {
+   gcc_assert (!ir_type ());
    profile_hooks = &rtl_profile_hooks;
  }
Index: protoize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/protoize.c,v
retrieving revision 1.91
diff -c -3 -p -r1.91 protoize.c
*** protoize.c	9 Nov 2004 10:12:18 -0000	1.91
--- protoize.c	3 Apr 2005 10:11:37 -0000
*************** Software Foundation, 59 Temple Place - S
*** 34,40 ****
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
- #undef abort
  #include "version.h"
  
  /* Include getopt.h for the sake of getopt_long.  */
--- 34,39 ----
*************** in_system_include_dir (const char *path)
*** 641,648 ****
  {
    const struct default_include *p;
  
!   if (! IS_ABSOLUTE_PATH (path))
!     abort ();		/* Must be an absolutized filename.  */
  
    for (p = cpp_include_defaults; p->fname; p++)
      if (!strncmp (path, p->fname, strlen (p->fname))
--- 640,646 ----
  {
    const struct default_include *p;
  
!   gcc_assert (IS_ABSOLUTE_PATH (path));
  
    for (p = cpp_include_defaults; p->fname; p++)
      if (!strncmp (path, p->fname, strlen (p->fname))
*************** file_could_be_converted (const char *pat
*** 679,688 ****
  	dir_last_slash = slash;
      }
  #endif
!     if (dir_last_slash)
!       *dir_last_slash = '\0';
!     else
!       abort ();  /* Should have been an absolutized filename.  */
    }
  
    if (access (path, W_OK))
--- 677,684 ----
  	dir_last_slash = slash;
      }
  #endif
!     gcc_assert (dir_last_slash);
!     *dir_last_slash = '\0';
    }
  
    if (access (path, W_OK))
*************** file_normally_convertible (const char *p
*** 723,732 ****
  	dir_last_slash = slash;
      }
  #endif
!     if (dir_last_slash)
!       *dir_last_slash = '\0';
!     else
!       abort ();  /* Should have been an absolutized filename.  */
    }
  
    if (access (path, R_OK))
--- 719,726 ----
  	dir_last_slash = slash;
      }
  #endif
!     gcc_assert (dir_last_slash);
!     *dir_last_slash = '\0';
    }
  
    if (access (path, R_OK))
*************** gen_aux_info_file (const char *base_file
*** 1930,1936 ****
  	  }
  	return 1;
        }
!     abort ();
    }
  }
  
--- 1924,1930 ----
  	  }
  	return 1;
        }
!     gcc_unreachable ();
    }
  }
  
*************** check_source (int cond, const char *clea
*** 2742,2749 ****
  static const char *
  seek_to_line (int n)
  {
!   if (n < last_known_line_number)
!     abort ();
  
    while (n > last_known_line_number)
      {
--- 2736,2742 ----
  static const char *
  seek_to_line (int n)
  {
!   gcc_assert (n >= last_known_line_number);
  
    while (n > last_known_line_number)
      {
*************** do_cleaning (char *new_clean_text_base, 
*** 3670,3677 ****
  	    {
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      if (++scan_p >= new_clean_text_limit)
! 		abort ();
  	    }
  	  *scan_p++ = ' ';
  	  *scan_p = ' ';
--- 3663,3670 ----
  	    {
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      ++scan_p;
! 	      gcc_assert (scan_p < new_clean_text_limit);
  	    }
  	  *scan_p++ = ' ';
  	  *scan_p = ' ';
*************** do_cleaning (char *new_clean_text_base, 
*** 3685,3692 ****
  	    {
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      if (++scan_p >= new_clean_text_limit)
! 		abort ();
  	    }
  	  *scan_p++ = ' ';
  	  break;
--- 3678,3685 ----
  	    {
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      ++scan_p;
! 	      gcc_assert (scan_p < new_clean_text_limit);
  	    }
  	  *scan_p++ = ' ';
  	  break;
*************** do_cleaning (char *new_clean_text_base, 
*** 3700,3707 ****
  		scan_p[1] = ' ';
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      if (++scan_p >= new_clean_text_limit)
! 		abort ();
  	    }
  	  *scan_p++ = ' ';
  	  break;
--- 3693,3700 ----
  		scan_p[1] = ' ';
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      ++scan_p;
! 	      gcc_assert (scan_p < new_clean_text_limit);
  	    }
  	  *scan_p++ = ' ';
  	  break;
*************** do_cleaning (char *new_clean_text_base, 
*** 3715,3722 ****
  		scan_p[1] = ' ';
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      if (++scan_p >= new_clean_text_limit)
! 		abort ();
  	    }
  	  if (!ISSPACE ((const unsigned char)*scan_p))
  	    *scan_p = ' ';
--- 3708,3715 ----
  		scan_p[1] = ' ';
  	      if (!ISSPACE ((const unsigned char)*scan_p))
  		*scan_p = ' ';
! 	      ++scan_p;
! 	      gcc_assert (scan_p < new_clean_text_limit);
  	    }
  	  if (!ISSPACE ((const unsigned char)*scan_p))
  	    *scan_p = ' ';
Index: tree-ssa-alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-alias.c,v
retrieving revision 2.78
diff -c -3 -p -r2.78 tree-ssa-alias.c
*** tree-ssa-alias.c	31 Mar 2005 17:13:30 -0000	2.78
--- tree-ssa-alias.c	3 Apr 2005 10:11:43 -0000
*************** collect_points_to_info_r (tree var, tree
*** 2065,2072 ****
    switch (TREE_CODE (stmt))
      {
      case RETURN_EXPR:
!       if (TREE_CODE (TREE_OPERAND (stmt, 0)) != MODIFY_EXPR)
! 	abort ();
        stmt = TREE_OPERAND (stmt, 0);
        /* FALLTHRU  */
  
--- 2065,2071 ----
    switch (TREE_CODE (stmt))
      {
      case RETURN_EXPR:
!       gcc_assert (TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR);
        stmt = TREE_OPERAND (stmt, 0);
        /* FALLTHRU  */
  
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-ccp.c,v
retrieving revision 2.61
diff -c -3 -p -r2.61 tree-ssa-ccp.c
*** tree-ssa-ccp.c	1 Apr 2005 03:42:44 -0000	2.61
--- tree-ssa-ccp.c	3 Apr 2005 10:11:48 -0000
*************** execute_fold_all_builtins (void)
*** 2204,2211 ****
  	  if (!set_rhs (stmtp, result))
  	    {
  	      result = convert_to_gimple_builtin (&i, result);
! 	      if (result && !set_rhs (stmtp, result))
! 		abort ();
  	    }
  	  modify_stmt (*stmtp);
  	  if (maybe_clean_eh_stmt (*stmtp)
--- 2204,2215 ----
  	  if (!set_rhs (stmtp, result))
  	    {
  	      result = convert_to_gimple_builtin (&i, result);
! 	      if (result)
! 		{
! 		  bool ok = set_rhs (stmtp, result);
! 		  
! 		  gcc_assert (ok);
! 		}
  	    }
  	  modify_stmt (*stmtp);
  	  if (maybe_clean_eh_stmt (*stmtp)
Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.54
diff -c -3 -p -r2.54 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c	22 Mar 2005 22:08:53 -0000	2.54
--- tree-ssa-loop-ivopts.c	3 Apr 2005 10:11:57 -0000
*************** static rtx
*** 2348,2355 ****
  produce_memory_decl_rtl (tree obj, int *regno)
  {
    rtx x;
!   if (!obj)
!     abort ();
    if (TREE_STATIC (obj) || DECL_EXTERNAL (obj))
      {
        const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj));
--- 2348,2355 ----
  produce_memory_decl_rtl (tree obj, int *regno)
  {
    rtx x;
!   
!   gcc_assert (obj);
    if (TREE_STATIC (obj) || DECL_EXTERNAL (obj))
      {
        const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]