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]

[Patch]: Fix uninitialized field in alpha.c


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.

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)


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