PATCH: silence warning in fwprop.c

Ben Elliston bje@au1.ibm.com
Thu Dec 10 06:24:00 GMT 2009


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




More information about the Gcc-patches mailing list