This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move DECL_VINDEX and DECL_SAVED_TREE into function_decl
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, jason at redhat dot com
- Date: Thu, 10 Jul 2014 13:57:56 +0200
- Subject: Re: Move DECL_VINDEX and DECL_SAVED_TREE into function_decl
- Authentication-results: sourceware.org; auth=none
- References: <20140623202541 dot GA21820 at kam dot mff dot cuni dot cz> <87egxtr19t dot fsf at kepler dot schwinge dot homeip dot net>
> I'm seeing ICEs: Âtree check: expected function_decl, have type_decl in
> fold_checksum_tree, at fold-const.c:14861Â. Is the following the correct
> fix, or should this be done differently?
No, it seems fine to me. I added it to my local patch, thanks!
Honza
>
> --- gcc/fold-const.c
> +++ gcc/fold-const.c
> @@ -14858,7 +14858,8 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
>
> if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_NON_COMMON))
> {
> - fold_checksum_tree (DECL_VINDEX (expr), ctx, ht);
> + if (TREE_CODE (expr) == FUNCTION_DECL)
> + fold_checksum_tree (DECL_VINDEX (expr), ctx, ht);
> fold_checksum_tree (DECL_RESULT_FLD (expr), ctx, ht);
> fold_checksum_tree (DECL_ARGUMENT_FLD (expr), ctx, ht);
> }
>
>
> GrÃÃe,
> Thomas