From patchwork Mon Aug 30 17:22:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] Fix use of uninitialized wi fields (PR debug/45419) Date: Mon, 30 Aug 2010 07:22:20 -0000 From: Jakub Jelinek X-Patchwork-Id: 63102 Message-Id: <20100830172220.GC1269@tyan-ft48-01.lab.bos.redhat.com> To: gcc-patches@gcc.gnu.org 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 PR debug/45419 * tree-ssa-live.c (dump_enumerated_decls): Clear the whole wi variable. Jakub --- 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;