This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] initialize local variable in tree-ssa.c
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: janis187 at us dot ibm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Oct 2007 23:36:54 +0100
- Subject: Re: [PATCH] initialize local variable in tree-ssa.c
- References: <1193782121.9717.13.camel@janis-laptop>
On 10/30/07, Janis Johnson <janis187@us.ibm.com> wrote:
> 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?
Doh, yes.
Thanks,
Richard.
> 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
>
>
>