Patchwork [bootstrap] : Initialize deref_align in ipa_modify_call_arguments to fix profiledbootstrap

login
register
mail settings
Submitter Uros Bizjak
Date Sept. 7, 2013, 8:15 a.m.
Message ID <CAFULd4ZRft+92Q189URzN0cfULBw2AEbD7fbwLBTQXgdbE_oFw@mail.gmail.com>
Download mbox | patch
Permalink /patch/273375/
State New
Headers show

Comments

Uros Bizjak - Sept. 7, 2013, 8:15 a.m.
Hello!

It looks that it is too hard for the compiler to track deref_align
initialization through dependent deref_base boolean. The patch bellow
fixes "may be used uninitialized" warning that breaks
profiledbootstrap.

2013-09-07  Uros Bizjak  <ubizjak@gmail.com>

    * ipa-prop.c (ipa_modify_call_arguments): Initialize deref_align.

Tested on x86_64-pc-linux-gnu with LTO profiledbootstrap.

OK for mainline?

Uros.
Richard Guenther - Sept. 9, 2013, 9 a.m.
On Sat, Sep 7, 2013 at 10:15 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> It looks that it is too hard for the compiler to track deref_align
> initialization through dependent deref_base boolean. The patch bellow
> fixes "may be used uninitialized" warning that breaks
> profiledbootstrap.
>
> 2013-09-07  Uros Bizjak  <ubizjak@gmail.com>
>
>     * ipa-prop.c (ipa_modify_call_arguments): Initialize deref_align.
>
> Tested on x86_64-pc-linux-gnu with LTO profiledbootstrap.
>
> OK for mainline?

Ok.

Thanks,
Richard.

> Uros.

Patch

Index: ipa-prop.c
===================================================================
--- ipa-prop.c	(revision 202352)
+++ ipa-prop.c	(working copy)
@@ -3526,7 +3526,7 @@  ipa_modify_call_arguments (struct cgraph_edge *cs,
 	{
 	  tree expr, base, off;
 	  location_t loc;
-	  unsigned int deref_align;
+	  unsigned int deref_align = 0;
 	  bool deref_base = false;
 
 	  /* We create a new parameter out of the value of the old one, we can