This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Patch to fix garbage collection problem with cgraph_fnver_htab
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, David Li <davidxl at google dot com>
- Date: Thu, 24 Oct 2013 20:08:58 +0200
- Subject: Re: [patch] Patch to fix garbage collection problem with cgraph_fnver_htab
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8Hmyg1iGqYtg22=eQnDqrHNnU3a9iD9Q4N5gC0F+AXHY7cA at mail dot gmail dot com>
> 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