diff mbox

Patch to fix garbage collection problem with cgraph_fnver_htab

Message ID CAAs8Hmyg1iGqYtg22=eQnDqrHNnU3a9iD9Q4N5gC0F+AXHY7cA@mail.gmail.com
State New
Headers show

Commit Message

Sriraman Tallam Oct. 24, 2013, 5:53 p.m. UTC
Hi Honza,

    It looks like cgraph_fnver_htab defined in cgraph.c is not added
to gc root in gt-cgraph.h. This patch fixes it.

* cgraph.c (cgraph_fnver_htab): Move GTY((...)) to be before htab_t.
Change param_is to use
the struct and not the pointer to the struct.


Ok to submit?

Thanks
Sri

Comments

Jan Hubicka Oct. 24, 2013, 6:08 p.m. UTC | #1
> Hi Honza,
> 
>     It looks like cgraph_fnver_htab defined in cgraph.c is not added
> to gc root in gt-cgraph.h. This patch fixes it.
> 
> * cgraph.c (cgraph_fnver_htab): Move GTY((...)) to be before htab_t.
> Change param_is to use
> the struct and not the pointer to the struct.

OK,
thanks!
Honza
> 
> Index: gcc/cgraph.c
> ===================================================================
> --- gcc/cgraph.c (revision 204022)
> +++ gcc/cgraph.c (working copy)
> @@ -138,7 +138,7 @@ bool cpp_implicit_aliases_done;
>     The cgraph_function_version_info has a THIS_NODE field that is the
>     corresponding cgraph_node..  */
> 
> -static htab_t GTY((param_is (struct cgraph_function_version_info *)))
> +static GTY((param_is (struct cgraph_function_version_info))) htab_t
>    cgraph_fnver_htab = NULL;
> 
>  /* Hash function for cgraph_fnver_htab.  */
> 
> Ok to submit?
> 
> Thanks
> Sri
diff mbox

Patch

Index: gcc/cgraph.c
===================================================================
--- gcc/cgraph.c (revision 204022)
+++ gcc/cgraph.c (working copy)
@@ -138,7 +138,7 @@  bool cpp_implicit_aliases_done;
    The cgraph_function_version_info has a THIS_NODE field that is the
    corresponding cgraph_node..  */

-static htab_t GTY((param_is (struct cgraph_function_version_info *)))
+static GTY((param_is (struct cgraph_function_version_info))) htab_t
   cgraph_fnver_htab = NULL;

 /* Hash function for cgraph_fnver_htab.  */