This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] initialize local variable in tree-ssa.c
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Oct 2007 15:08:41 -0700
- Subject: [PATCH] initialize local variable in tree-ssa.c
- Reply-to: janis187 at us dot ibm dot com
For mainline cc1 with the testcase in PR33635 with -O1, valgrind reports
use of an uninitialized variable. I don't have a test case where it
makes a difference, but this patch stops the complaint from valgrind.
Tested on powerpc64-linux, ok for mainline?
This case might also be of interest to those trying to warn about
uninitialized variables.
2007-10-30 Janis Johnson <janis187@us.ibm.com>
* tree-ssa.c (execute_update_addresses_taken): Initialize update_vops.
Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c (revision 129723)
+++ gcc/tree-ssa.c (working copy)
@@ -1426,7 +1426,7 @@
basic_block bb;
bitmap addresses_taken = BITMAP_ALLOC (NULL);
bitmap vars_updated = BITMAP_ALLOC (NULL);
- bool update_vops;
+ bool update_vops = false;
tree phi;
/* Collect into ADDRESSES_TAKEN all variables whose address is taken within