diff mbox

[committed] Fix use of uninitialized wi fields (PR debug/45419)

Message ID 20100830172220.GC1269@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Aug. 30, 2010, 5:22 p.m. UTC
Hi!

http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162156
added walking without fully initialized automatic wi variable,
so e.g. valgrind complains about that.

Fixed by doing what other places do, bootstrapped/regtested on x86_64-linux
and i686-linux, committed to trunk as obvious.

2010-08-30  Jakub Jelinek  <jakub@redhat.com>

	PR debug/45419
	* tree-ssa-live.c (dump_enumerated_decls): Clear the whole wi variable.


	Jakub
diff mbox

Patch

--- gcc/tree-ssa-live.c.jj	2010-08-20 16:05:41.000000000 +0200
+++ gcc/tree-ssa-live.c	2010-08-30 14:51:14.000000000 +0200
@@ -1250,8 +1250,8 @@  dump_enumerated_decls (FILE *file, int f
   struct walk_stmt_info wi;
   VEC (numbered_tree, heap) *decl_list = VEC_alloc (numbered_tree, heap, 40);
 
+  memset (&wi, '\0', sizeof (wi));
   wi.info = (void*) decl_list;
-  wi.pset = NULL;
   FOR_EACH_BB (bb)
     {
       gimple_stmt_iterator gsi;