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]

Uninitialized variables



gcc emits many warnings about uninitialized variables while bootstrapping.
This patch fixes a few of them - I'll try to keep working on it.
Compiler appears to be successfully bootstrapping on i386-linux (so far) 
with these changes.

Fri Apr  9 Fri Apr  9 1999  Toshiyasu Morita  (tm@netcom.com)

	fold-const.c (make_range): Ensure variables initialized.
	(fold): Same.
	function.c (fixup_var_refs_insns): Same.
	(instantiate_virtual_regs_1): Same.
	optabs.c (expand_binop): Same.
	stmt.c (expand_end_case): Same.

*** fold-const.c.bak	Fri Apr  9 01:51:22 1999
--- fold-const.c	Fri Apr  9 01:52:25 1999
*************** make_range (exp, pin_p, plow, phigh)
*** 3109,3115 ****
       tree *plow, *phigh;
  {
    enum tree_code code;
!   tree arg0, arg1, type = NULL_TREE;
    tree orig_type = NULL_TREE;
    int in_p, n_in_p;
    tree low, high, n_low, n_high;
--- 3109,3115 ----
       tree *plow, *phigh;
  {
    enum tree_code code;
!   tree arg0 = NULL_TREE, arg1 = NULL_TREE, type = NULL_TREE;
    tree orig_type = NULL_TREE;
    int in_p, n_in_p;
    tree low, high, n_low, n_high;
*************** fold (expr) 
*** 4767,4773 ****
  	  if (TREE_CODE (arg0) == MULT_EXPR && TREE_CODE (arg1) == MULT_EXPR)
  	    {
  	      tree arg00, arg01, arg10, arg11;
! 	      tree alt0, alt1, same;
  
  	      /* (A * C) + (B * C) -> (A+B) * C.
  		 We are most concerned about the case where C is a constant,
--- 4767,4773 ----
  	  if (TREE_CODE (arg0) == MULT_EXPR && TREE_CODE (arg1) == MULT_EXPR)
  	    {
  	      tree arg00, arg01, arg10, arg11;
! 	      tree alt0 = NULL_TREE, alt1 = NULL_TREE, same;
  
  	      /* (A * C) + (B * C) -> (A+B) * C.
  		 We are most concerned about the case where C is a constant,
*** function.c.bak	Fri Apr  9 01:52:57 1999
--- function.c	Fri Apr  9 01:53:43 1999
*************** fixup_var_refs_insns (var, promoted_mode
*** 1818,1824 ****
       struct hash_table *ht;
  {
    rtx call_dest = 0;
!   rtx insn_list;
  
    /* If we already know which INSNs reference VAR there's no need
       to walk the entire instruction chain.  */
--- 1818,1824 ----
       struct hash_table *ht;
  {
    rtx call_dest = 0;
!   rtx insn_list = NULL_RTX;
  
    /* If we already know which INSNs reference VAR there's no need
       to walk the entire instruction chain.  */
*************** instantiate_virtual_regs_1 (loc, object,
*** 3640,3646 ****
    rtx x;
    RTX_CODE code;
    rtx new = 0;
!   HOST_WIDE_INT offset;
    rtx temp;
    rtx seq;
    int i, j;
--- 3640,3646 ----
    rtx x;
    RTX_CODE code;
    rtx new = 0;
!   HOST_WIDE_INT offset = 0;
    rtx temp;
    rtx seq;
    int i, j;
*** optabs.c.bak	Fri Apr  9 02:03:34 1999
--- optabs.c	Fri Apr  9 02:04:20 1999
*************** expand_binop (mode, binoptab, op0, op1, 
*** 897,903 ****
        rtx carry_tmp = gen_reg_rtx (word_mode);
        optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
        int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
!       rtx carry_in, carry_out;
        rtx xop0, xop1;
  
        /* We can handle either a 1 or -1 value for the carry.  If STORE_FLAG
--- 897,903 ----
        rtx carry_tmp = gen_reg_rtx (word_mode);
        optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
        int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
!       rtx carry_in = NULL_RTX, carry_out = NULL_RTX;
        rtx xop0, xop1;
  
        /* We can handle either a 1 or -1 value for the carry.  If STORE_FLAG
*************** expand_binop (mode, binoptab, op0, op1, 
*** 1067,1074 ****
        rtx op1_high = operand_subword_force (op1, high, mode);
        rtx op1_low = operand_subword_force (op1, low, mode);
        rtx product = 0;
!       rtx op0_xhigh;
!       rtx op1_xhigh;
  
        /* If the target is the same as one of the inputs, don't use it.  This
  	 prevents problems with the REG_EQUAL note.  */
--- 1067,1074 ----
        rtx op1_high = operand_subword_force (op1, high, mode);
        rtx op1_low = operand_subword_force (op1, low, mode);
        rtx product = 0;
!       rtx op0_xhigh = NULL_RTX;
!       rtx op1_xhigh = NULL_RTX;
  
        /* If the target is the same as one of the inputs, don't use it.  This
  	 prevents problems with the REG_EQUAL note.  */
*** stmt.c.bak	Fri Apr  9 02:02:43 1999
--- stmt.c	Fri Apr  9 02:03:12 1999
***************
*** 5024,5030 ****
  expand_end_case (orig_index)
       tree orig_index;
  {
!   tree minval, maxval, range, orig_minval;
    rtx default_label = 0;
    register struct case_node *n;
    unsigned int count;
--- 5024,5030 ----
  expand_end_case (orig_index)
       tree orig_index;
  {
!   tree minval = NULL_TREE, maxval = NULL_TREE, range, orig_minval;
    rtx default_label = 0;
    register struct case_node *n;
    unsigned int count;



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