]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (emit_jump_insn_before, [...]): Fix uninitialized variable.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 10 Aug 2002 12:30:34 +0000 (12:30 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 10 Aug 2002 12:30:34 +0000 (12:30 +0000)
* emit-rtl.c (emit_jump_insn_before, emit_call_insn_before,
emit_jump_insn): Fix uninitialized variable.
* gcov.c (init_line_info): Likewise.
* genautomata.c (transform_3): Add braces around ambiguous
else.
* ifcvt.c (cond_exec_process_insns): Mark parameter with
ATTRIBUTE_UNUSED.
* ra-build.c (parts_to_webs_1): Fix uninitialized variable.
* regrename.c (copyprop_hardreg_forward): Fix uninitialized
variable.

From-SVN: r56182

gcc/ChangeLog
gcc/emit-rtl.c
gcc/gcov.c
gcc/genautomata.c
gcc/ifcvt.c
gcc/ra-build.c
gcc/regrename.c

index 787ae7a527af2b9258c18cacf81142741c4ed18b..02b40fc4de70686210f45df04f38b1a8105a018f 100644 (file)
@@ -1,5 +1,16 @@
 2002-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
+       * emit-rtl.c (emit_jump_insn_before, emit_call_insn_before,
+       emit_jump_insn): Fix uninitialized variable.
+       * gcov.c (init_line_info): Likewise.
+       * genautomata.c (transform_3): Add braces around ambiguous
+       else.
+       * ifcvt.c (cond_exec_process_insns): Mark parameter with
+       ATTRIBUTE_UNUSED.
+       * ra-build.c (parts_to_webs_1): Fix uninitialized variable.
+       * regrename.c (copyprop_hardreg_forward): Fix uninitialized
+       variable.
+
        * gengtype.c (write_gc_structure_fields): Avoid signed/unsigned
        warnings in output files.
 
index d8689243e98de01fbbc724f7769452f9f506aaf3..cf138d372599e434eff6c4cc719ab645697de10b 100644 (file)
@@ -3974,7 +3974,7 @@ rtx
 emit_jump_insn_before (x, before)
      rtx x, before;
 {
-  rtx insn, last;
+  rtx insn, last = NULL_RTX;
 
 #ifdef ENABLE_RTL_CHECKING
   if (before == NULL_RTX)
@@ -4021,7 +4021,7 @@ rtx
 emit_call_insn_before (x, before)
      rtx x, before;
 {
-  rtx last, insn;
+  rtx last = NULL_RTX, insn;
 
 #ifdef ENABLE_RTL_CHECKING
   if (before == NULL_RTX)
@@ -4506,7 +4506,7 @@ rtx
 emit_jump_insn (x)
      rtx x;
 {
-  rtx last, insn;
+  rtx last = NULL_RTX, insn;
 
   switch (GET_CODE (x))
     {
index 2c526088635db1cc24cfe1cd29360a046601c99d..a9658b267556ff57a93c1f77d694336733622756 100644 (file)
@@ -1308,7 +1308,7 @@ init_line_info (line_info, total, maxlineno)
   char *ptr = bb_data;
   long count;
   long line_num;
-  struct line_info *line_ptr; /* line info ptr. */
+  struct line_info *line_ptr = 0; /* line info ptr. */
    
   memset (&function, 0, sizeof (function));
   if (output_function_summary)
index 08f81734574877b5715ebdff8849197727eb453f..9fd1e836d891c846e20a9eabd9ec13ec2fd6c260 100644 (file)
@@ -4983,17 +4983,19 @@ transform_3 (regexp)
       max_seq_length = 0;
       if (regexp->mode == rm_allof)
        for (i = 0; i < REGEXP_ALLOF (regexp)->regexps_num; i++)
-         if (REGEXP_ALLOF (regexp)->regexps [i]->mode == rm_sequence)
-           {
-             seq = REGEXP_ALLOF (regexp)->regexps [i];
-             if (max_seq_length < REGEXP_SEQUENCE (seq)->regexps_num)
-             max_seq_length = REGEXP_SEQUENCE (seq)->regexps_num;
-           }
-         else if (REGEXP_ALLOF (regexp)->regexps [i]->mode != rm_unit)
-           {
-             max_seq_length = 0;
-             break;
-           }
+         {
+           if (REGEXP_ALLOF (regexp)->regexps [i]->mode == rm_sequence)
+             {
+               seq = REGEXP_ALLOF (regexp)->regexps [i];
+               if (max_seq_length < REGEXP_SEQUENCE (seq)->regexps_num)
+                 max_seq_length = REGEXP_SEQUENCE (seq)->regexps_num;
+             }
+           else if (REGEXP_ALLOF (regexp)->regexps [i]->mode != rm_unit)
+             {
+               max_seq_length = 0;
+               break;
+             }
+         }
       if (max_seq_length != 0)
        {
          if (max_seq_length == 1 || REGEXP_ALLOF (regexp)->regexps_num <= 1)
index db7140a699870d961d35a2794aa8db0d2909ffda..82660be612d60660befbb84cf793b925f20fd1e9 100644 (file)
@@ -224,7 +224,7 @@ block_fallthru (bb)
 
 static int
 cond_exec_process_insns (ce_info, start, end, test, prob_val, mod_ok)
-     ce_if_block_t *ce_info  /* if block information */
+     ce_if_block_t *ce_info ATTRIBUTE_UNUSED;  /* if block information */
      rtx start;                        /* first insn to look at */
      rtx end;                  /* last insn to look at */
      rtx test;                 /* conditional execution test */
index a7351f20037b8eba40b5dc10f9911be4402ccd58..87683cb9c02c94da64c629f5500270fdf139a30e 100644 (file)
@@ -1815,7 +1815,7 @@ parts_to_webs_1 (df, copy_webs, all_refs)
   webnum = 0;
   for (i = 0; i < def_id + use_id; i++)
     {
-      struct web *web, *subweb;
+      struct web *subweb, *web = 0; /* Initialize web to silence warnings.  */
       struct web_part *wp = &web_parts[i];
       struct ref *ref = wp->ref;
       unsigned int ref_id;
index 62629f0a4cbe049a7f33918852bee72a8aefde78..5a80a90eb83911f3c86050de44e0600be00e96d5 100644 (file)
@@ -1780,7 +1780,7 @@ copyprop_hardreg_forward ()
 {
   struct value_data *all_vd;
   bool need_refresh;
-  basic_block bb, bbp;
+  basic_block bb, bbp = 0;
 
   need_refresh = false;