Patchwork Fix 2010-06-08 gc-improv-merge, for AVMS

login
register
mail settings
Submitter Douglas B Rupp
Date June 26, 2010, 12:43 a.m.
Message ID <4C254D38.2090704@gnat.com>
Download mbox | patch
Permalink /patch/57046/
State New
Headers show

Comments

Douglas B Rupp - June 26, 2010, 12:43 a.m.
The above named patch breaks Alpha/VMS.
Please find proposed patch attached, to fix.
Is it correct and ok to commit?

--Douglas Rupp
AdaCore
2010-06-25  Douglas B Rupp  <rupp@gnat.com>

	* alpha.c (alpha_need_linkage): Adjust splay_tree_new_ggc call.
	(alpha_use_linkage): Likewise.
Laurynas Biveinis - June 26, 2010, 2:52 p.m.
2010/6/26 Douglas B Rupp <rupp@gnat.com>:
> The above named patch breaks Alpha/VMS.
> Please find proposed patch attached, to fix.
> Is it correct and ok to commit?
>
> --Douglas Rupp
> AdaCore
>
>
> 2010-06-25  Douglas B Rupp  <rupp@gnat.com>
>
>        * alpha.c (alpha_need_linkage): Adjust splay_tree_new_ggc call.
>        (alpha_use_linkage): Likewise.

I cannot approve this, but it looks correct to me and IMHO you can
apply it as an obvious patch.

I don't know how this slipped past my testing; thanks for fixing it.
Richard Henderson - July 8, 2010, midnight
> 2010-06-25  Douglas B Rupp  <rupp@gnat.com>
> 
> 	* alpha.c (alpha_need_linkage): Adjust splay_tree_new_ggc call.
> 	(alpha_use_linkage): Likewise.

Ok.


r~

Patch

diff -rupN gcc/config/alpha/alpha.c gcc/config/alpha/alpha.c
--- gcc/config/alpha/alpha.c	2010-06-08 00:25:24.000000000 -0700
+++ gcc/config/alpha/alpha.c	2010-06-25 16:22:31.000000000 -0700
@@ -9900,8 +9900,11 @@  alpha_need_linkage (const char *name, in
       struct alpha_funcs *cfaf;
 
       if (!alpha_funcs_tree)
-        alpha_funcs_tree = splay_tree_new_ggc ((splay_tree_compare_fn)
-					       splay_tree_compare_pointers);
+        alpha_funcs_tree = splay_tree_new_ggc
+	 (splay_tree_compare_pointers,
+	  ggc_alloc_splay_tree_tree_node_tree_node_splay_tree_s,
+	  ggc_alloc_splay_tree_tree_node_tree_node_splay_tree_node_s);
+
 
       cfaf = ggc_alloc_alpha_funcs ();
 
@@ -9937,7 +9940,10 @@  alpha_need_linkage (const char *name, in
 	}
     }
   else
-    alpha_links_tree = splay_tree_new_ggc ((splay_tree_compare_fn) strcmp);
+    alpha_links_tree = splay_tree_new_ggc
+	 ((splay_tree_compare_fn) strcmp,
+	  ggc_alloc_splay_tree_str_alpha_links_splay_tree_s,
+	  ggc_alloc_splay_tree_str_alpha_links_splay_tree_node_s);
 
   al = ggc_alloc_alpha_links ();
   name = ggc_strdup (name);
@@ -9995,7 +10001,10 @@  alpha_use_linkage (rtx func, tree cfunde
 	al = (struct alpha_links *) lnode->value;
     }
   else
-    cfaf->links = splay_tree_new_ggc ((splay_tree_compare_fn) strcmp);
+    cfaf->links = splay_tree_new_ggc
+      ((splay_tree_compare_fn) strcmp,
+       ggc_alloc_splay_tree_str_alpha_links_splay_tree_s,
+       ggc_alloc_splay_tree_str_alpha_links_splay_tree_node_s);
 
   if (!al)
     {