This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] initialize local variable in tree-ssa.c


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
>
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]