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: silence warning in fwprop.c


This patch silences a warning about the variable `use' being unused.  It
is clear from an inspection of free_load_extend that `use' can be
referenced unintialised if this loop has a zero trip count:

   for (use_vec = DF_INSN_USES (insn); *use_vec; use_vec++)

Tested with a bootstrap on powerpc64-linux.  Okay for the trunk?


2009-12-10  Ben Elliston  <bje@au.ibm.com>

	* fwprop.c (free_load_extend): Initialise `use'.

Index: fwprop.c
===================================================================
--- fwprop.c	(revision 155122)
+++ fwprop.c	(working copy)
@@ -1039,7 +1039,7 @@
 {
   rtx reg;
   df_ref *use_vec;
-  df_ref use, def;
+  df_ref use = 0, def;
 
   reg = XEXP (src, 0);
 #ifdef LOAD_EXTEND_OP



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