Patchwork : Fix uninitialized field in alpha.c

login
register
mail settings
Submitter Tristan Gingold
Date Sept. 21, 2010, 1:15 p.m.
Message ID <45639F5B-E347-43EA-97C7-B4687819D812@adacore.com>
Download mbox | patch
Permalink /patch/65307/
State New
Headers show

Comments

Tristan Gingold - Sept. 21, 2010, 1:15 p.m.
Hi,

we have used this patch for a long time to avoid an uninitialized variable.  I have just checked it still applies on head.

Ok for mainline (or obvious) ?

Tristan.

2010-09-21  Tristan Gingold  <gingold@adacore.com>

       * config/alpha/alpha.c (alpha_use_linkage): Initialize target field.
Richard Henderson - Sept. 21, 2010, 6:11 p.m.
On 09/21/2010 06:15 AM, Tristan Gingold wrote:
>        * config/alpha/alpha.c (alpha_use_linkage): Initialize target field.

Ok.


r~

Patch

diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 4db554c..49c86fd 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -10029,6 +10029,7 @@  alpha_use_linkage (rtx func, tree cfundecl, int lflag, i
 
       al = ggc_alloc_alpha_links ();
       al->num = cfaf->num;
+      al->target = NULL;
 
       node = splay_tree_lookup (alpha_links_tree, (splay_tree_key) name);
       if (node)