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]

[tree-ssa] Fix warnings for PPC bootstraps [patch]


Fixes warnings that prevent bootstrapping on PPC.  We should do
something in the gimplifier to avoid emitting these silly
warnings.  Jason, any suggestions?

There's one change I needed to make to t-rs6000 that puzzles me.
Even though the port defines ASM_OUTPUT_ALIGNED_BSS, varasm.c
doesn't seem to call asm_output_aligned_bss, so we get a warning
for an unused static function.  Could one of the PPC folks give
me a hand with this?  I re-added -Wno-error to varasm.o for now.

Bootstrap still in progress.  Will commit afterwards.


Diego.

	Warning fixes for bootstrapping on PPC.

	* config/rs6000/rs6000.md (modsi3): Initialize variable 'i'.
	(moddi3): Likewise.
	* config/rs6000/t-rs6000 (varasm.o-warn): Add -Wno-error.
	* config/rs6000/rs6000.c (print_operand): Initialize variable 'i'.

	* c-typeck.c (build_component_ref): Initialize variable 'ref'.
	* cfgrtl.c (create_basic_block_structure): Initialize variable 'bb'.
	* combine.c (simplify_if_then_else): Initialize variables 'i'
	and 'nzb'.
	(simplify_set): Initialize variable 'cc_use'.
	* fold-const.c (fold_range_test): Initialize variable 'tem'.
	* ifcvt.c (noce_try_store_flag_constants): Initialize variable 'tmp'.
	(noce_process_if_block): Initialize variable 'set_a'.
	* jump.c (follow_jumps): Initialize variable 'insn'.
	* reload1.c (do_output_reload): Initialize variable 'note'.
	(gen_reload): Initialize variable 'tem'.
	* rtlanal.c (get_jump_table_offset): Initialize variable 'table'.

	* objc/objc-act.c (generate_ivar_lists): Initialize variable 'chain'.

cp/ChangeLog.tree-ssa

	Warning fixes for bootstrapping on PPC.

	* cp/pt.c (tsubst_copy_and_build): Initialize variable 'id'.
	* cp/decl2.c (build_expr_from_tree): Initialize variable 'id'.

f/ChangeLog.tree-ssa

	Warning fixes for bootstrapping on PPC.

	* f/where.c (ffewhere_track): Initialize variable 'lo'.


java/ChangeLog.tree-ssa

	Warning fixes for bootstrapping on PPC.

	* java/expr.c (java_stack_swap): Initialize variables
	'type1' and 'type2'.


Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.196.2.16
diff -d -u -p -r1.196.2.16 c-typeck.c
--- c-typeck.c	3 Feb 2003 17:08:25 -0000	1.196.2.16
+++ c-typeck.c	3 Feb 2003 23:14:59 -0000
@@ -1099,7 +1099,7 @@ build_component_ref (datum, component)
   tree type = TREE_TYPE (datum);
   enum tree_code code = TREE_CODE (type);
   tree field = NULL;
-  tree ref;
+  tree ref = NULL;  /* [GIMPLE] Avoid uninitialized use warning.  */
 
   /* If DATUM is a COMPOUND_EXPR, move our reference inside it.
      If pedantic ensure that the arguments are not lvalues; otherwise,
Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.57.2.5
diff -d -u -p -r1.57.2.5 cfgrtl.c
--- cfgrtl.c	3 Feb 2003 17:08:26 -0000	1.57.2.5
+++ cfgrtl.c	3 Feb 2003 23:15:00 -0000
@@ -251,7 +251,7 @@ create_basic_block_structure (head, end,
      rtx head, end, bb_note;
      basic_block after;
 {
-  basic_block bb;
+  basic_block bb = NULL;  /* [GIMPLE] Avoid uninitialized use warning.  */
 
   if (bb_note
       && ! RTX_INTEGRATED_P (bb_note)
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.299.2.17
diff -d -u -p -r1.299.2.17 combine.c
--- combine.c	3 Feb 2003 17:08:26 -0000	1.299.2.17
+++ combine.c	3 Feb 2003 23:15:00 -0000
@@ -4731,7 +4731,7 @@ simplify_if_then_else (x)
   enum rtx_code true_code = GET_CODE (cond);
   int comparison_p = GET_RTX_CLASS (true_code) == '<';
   rtx temp;
-  int i;
+  int i = 0;	/* [GIMPLE] Avoid uninitialized use warning.  */
   enum rtx_code false_code;
   rtx reversed;
 
@@ -4755,7 +4755,7 @@ simplify_if_then_else (x)
 	  != UNKNOWN)
       && GET_CODE (XEXP (cond, 0)) == REG)
     {
-      HOST_WIDE_INT nzb;
+      HOST_WIDE_INT nzb = 0;  /* [GIMPLE] Avoid uninitialized use warning.  */
       rtx from = XEXP (cond, 0);
       rtx true_val = XEXP (cond, 1);
       rtx false_val = true_val;
@@ -5053,7 +5053,7 @@ simplify_set (x)
   enum machine_mode mode
     = GET_MODE (src) != VOIDmode ? GET_MODE (src) : GET_MODE (dest);
   rtx other_insn;
-  rtx *cc_use;
+  rtx *cc_use = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
 
   /* (set (pc) (return)) gets written as (return).  */
   if (GET_CODE (dest) == PC && GET_CODE (src) == RETURN)
Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.213.2.19
diff -d -u -p -r1.213.2.19 fold-const.c
--- fold-const.c	3 Feb 2003 17:08:35 -0000	1.213.2.19
+++ fold-const.c	3 Feb 2003 23:15:01 -0000
@@ -3375,7 +3375,7 @@ fold_range_test (exp)
   tree low0, low1, low, high0, high1, high;
   tree lhs = make_range (TREE_OPERAND (exp, 0), &in0_p, &low0, &high0);
   tree rhs = make_range (TREE_OPERAND (exp, 1), &in1_p, &low1, &high1);
-  tree tem;
+  tree tem = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
 
   /* If this is an OR operation, invert both sides; we will invert
      again at the end.  */
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.95.2.11
diff -d -u -p -r1.95.2.11 ifcvt.c
--- ifcvt.c	3 Feb 2003 17:08:37 -0000	1.95.2.11
+++ ifcvt.c	3 Feb 2003 23:15:01 -0000
@@ -740,6 +740,8 @@ noce_try_store_flag_constants (if_info)
   int normalize, can_reverse;
   enum machine_mode mode;
 
+  tmp = 0;	/* [GIMPLE] Avoid uninitialized use warning.  */
+
   if (! no_new_pseudos
       && GET_CODE (if_info->a) == CONST_INT
       && GET_CODE (if_info->b) == CONST_INT)
@@ -1733,6 +1735,8 @@ noce_process_if_block (ce_info)
   rtx set_a, set_b;
   rtx orig_x, x, a, b;
   rtx jump, cond;
+
+  set_a = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
 
   /* We're looking for patterns of the form
 
Index: jump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/jump.c,v
retrieving revision 1.210.2.7
diff -d -u -p -r1.210.2.7 jump.c
--- jump.c	17 Jan 2003 19:52:43 -0000	1.210.2.7
+++ jump.c	3 Feb 2003 23:15:01 -0000
@@ -1343,6 +1343,8 @@ follow_jumps (label)
   rtx value = label;
   int depth;
 
+  insn = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
+
   for (depth = 0;
        (depth < 10
 	&& (insn = next_active_insn (value)) != 0
Index: regmove.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regmove.c,v
retrieving revision 1.131.2.6
diff -d -u -p -r1.131.2.6 regmove.c
--- regmove.c	17 Jan 2003 19:52:49 -0000	1.131.2.6
+++ regmove.c	3 Feb 2003 23:15:01 -0000
@@ -105,7 +105,8 @@ try_auto_increment (insn, inc_insn, inc_
      HOST_WIDE_INT increment;
      int pre;
 {
-  enum rtx_code inc_code;
+  /* [GIMPLE] Avoid uninitialized use warning.  */
+  enum rtx_code inc_code = UNKNOWN;
 
   rtx pset = single_set (insn);
   if (pset)
Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.346.2.15
diff -d -u -p -r1.346.2.15 reload1.c
--- reload1.c	3 Feb 2003 17:08:41 -0000	1.346.2.15
+++ reload1.c	3 Feb 2003 23:15:02 -0000
@@ -6948,6 +6948,8 @@ do_output_reload (chain, rl, j)
      store.  */
   rtx pseudo = rl->out_reg;
 
+  note = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
+
   if (pseudo
       && optimize
       && GET_CODE (pseudo) == REG
@@ -7389,7 +7391,7 @@ gen_reload (out, in, opnum, type)
      enum reload_type type;
 {
   rtx last = get_last_insn ();
-  rtx tem;
+  rtx tem = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
 
   /* If IN is a paradoxical SUBREG, remove it and try to put the
      opposite SUBREG on OUT.  Likewise for a paradoxical SUBREG on OUT.  */
Index: rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.135.2.8
diff -d -u -p -r1.135.2.8 rtlanal.c
--- rtlanal.c	3 Feb 2003 17:08:42 -0000	1.135.2.8
+++ rtlanal.c	3 Feb 2003 23:15:02 -0000
@@ -466,6 +466,7 @@ get_jump_table_offset (insn, earliest)
   int i;
 
   set = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
+  table = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
 
   if (GET_CODE (insn) != JUMP_INSN
       || ! (label = JUMP_LABEL (insn))
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.332.2.19
diff -d -u -p -r1.332.2.19 rs6000.c
--- config/rs6000/rs6000.c	3 Feb 2003 17:09:02 -0000	1.332.2.19
+++ config/rs6000/rs6000.c	3 Feb 2003 23:15:05 -0000
@@ -7443,6 +7443,8 @@ print_operand (file, x, code)
   HOST_WIDE_INT val;
   unsigned HOST_WIDE_INT uval;
 
+  i = 0;	/* [GIMPLE] Avoid uninitialized use warning.  */
+
   switch (code)
     {
     case '.':
Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.190.2.19
diff -d -u -p -r1.190.2.19 rs6000.md
--- config/rs6000/rs6000.md	3 Feb 2003 17:09:03 -0000	1.190.2.19
+++ config/rs6000/rs6000.md	3 Feb 2003 23:15:05 -0000
@@ -2683,7 +2683,7 @@
   ""
   "
 {
-  int i;
+  int i = 0;	/* [GIMPLE] Avoid uninitialized use warning.  */
   rtx temp1;
   rtx temp2;
 
@@ -6816,7 +6816,7 @@
   "TARGET_POWERPC64"
   "
 {
-  int i;
+  int i = 0;	/* [GIMPLE] Avoid uninitialized use warning.  */
   rtx temp1;
   rtx temp2;
 
Index: config/rs6000/t-rs6000
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/t-rs6000,v
retrieving revision 1.5.22.3
diff -d -u -p -r1.5.22.3 t-rs6000
--- config/rs6000/t-rs6000	3 Feb 2003 17:09:04 -0000	1.5.22.3
+++ config/rs6000/t-rs6000	3 Feb 2003 23:15:05 -0000
@@ -16,6 +16,7 @@ rs6000-c.o: $(srcdir)/config/rs6000/rs60
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/rs6000/rs6000-c.c
 
 # The rs6000 backend doesn't cause warnings in these files.
-varasm.o-warn =
 insn-conditions.o-warn =
 $(out_object_file)-warn =
+# varasm.o causes a warning for asm_output_aligned_bss defined but not used.
+varasm.o-warn = -Wno-error
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.540.2.24
diff -d -u -p -r1.540.2.24 decl2.c
--- cp/decl2.c	3 Feb 2003 17:09:13 -0000	1.540.2.24
+++ cp/decl2.c	3 Feb 2003 23:15:05 -0000
@@ -3087,7 +3087,7 @@ build_expr_from_tree (t)
       else
 	{
 	  tree name = TREE_OPERAND (t, 0);
-          tree id;
+          tree id = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
           tree args = build_expr_from_tree (TREE_OPERAND (t, 1));
           if (args != NULL_TREE && TREE_CODE (name) == LOOKUP_EXPR
               && !LOOKUP_EXPR_GLOBAL (name)
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.591.2.23
diff -d -u -p -r1.591.2.23 pt.c
--- cp/pt.c	3 Feb 2003 17:09:14 -0000	1.591.2.23
+++ cp/pt.c	3 Feb 2003 23:15:06 -0000
@@ -8159,7 +8159,7 @@ tsubst_copy_and_build (t, args, complain
 	else
 	  {
 	    tree name = function;
-	    tree id;
+	    tree id = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
 	    
 	    if (copy_args != NULL_TREE && TREE_CODE (name) == LOOKUP_EXPR
 		&& !LOOKUP_EXPR_GLOBAL (name)
Index: f/where.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/where.c,v
retrieving revision 1.10.2.1
diff -d -u -p -r1.10.2.1 where.c
--- f/where.c	26 Aug 2002 01:35:19 -0000	1.10.2.1
+++ f/where.c	3 Feb 2003 23:15:06 -0000
@@ -392,6 +392,8 @@ ffewhere_track (ffewhereLine *wl, ffewhe
   unsigned int lo;
   unsigned int co;
 
+  lo = 0;	/* [GIMPLE] Avoid uninitialized use warning.  */
+
   if ((ffewhere_line_is_unknown (*wl))
       || (ffewhere_column_is_unknown (*wc))
       || ((lo = ln - ffewhere_line_number (*wl)) >= FFEWHERE_indexUNKNOWN))
Index: java/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.147.2.9
diff -d -u -p -r1.147.2.9 expr.c
--- java/expr.c	3 Feb 2003 17:09:19 -0000	1.147.2.9
+++ java/expr.c	3 Feb 2003 23:15:06 -0000
@@ -493,6 +493,9 @@ java_stack_swap (void)
   rtx temp;
   tree decl1, decl2;
 
+  type1 = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
+  type2 = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
+
   if (stack_pointer < 2
       || (type1 = stack_type_map[stack_pointer - 1]) == TYPE_UNKNOWN
       || (type2 = stack_type_map[stack_pointer - 2]) == TYPE_UNKNOWN
Index: objc/objc-act.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v
retrieving revision 1.137.2.14
diff -d -u -p -r1.137.2.14 objc-act.c
--- objc/objc-act.c	3 Feb 2003 17:09:21 -0000	1.137.2.14
+++ objc/objc-act.c	3 Feb 2003 23:15:07 -0000
@@ -3863,6 +3863,7 @@ generate_ivar_lists ()
   tree cast, variable_length_type;
   int size;
 
+  chain = NULL;	/* [GIMPLE] Avoid uninitialized use warning.  */
   generating_instance_variables = 1;
 
   if (!objc_ivar_template)


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