This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: silence warning in fwprop.c
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: amodra at bigpond dot net dot au
- Date: Thu, 10 Dec 2009 15:01:58 +1100
- Subject: 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