This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/68117] [6 Regression] error: invalid PHI argument <<< Unknown tree: <invalid tree code> >>>
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Nov 2015 08:48:52 +0000
- Subject: [Bug middle-end/68117] [6 Regression] error: invalid PHI argument <<< Unknown tree: <invalid tree code> >>>
- Auto-submitted: auto-generated
- References: <bug-68117-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68117
--- Comment #26 from rguenther at suse dot de <rguenther at suse dot de> ---
On Sun, 15 Nov 2015, trippels at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68117
>
> --- Comment #25 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
> I think the issue is caused by Richi's r229405.
>
> In this patch the following two lines were accidentally removed from
> tree-ssa.c (delete_tree_ssa):
>
> - /* We no longer need the edge variable maps. */
> - redirect_edge_var_map_destroy ();
>
> Restoring them fixes the bug for me:
Hmm, they were removed "intentionally" (the function destroys
a global map which should never be non-NULL after a patch finished).
Of course I failed to add an assert for that ;)
> diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
> index 84a4d5b..02fca4c 100644
> --- a/gcc/tree-ssa.c
> +++ b/gcc/tree-ssa.c
> @@ -1126,6 +1126,9 @@ delete_tree_ssa (struct function *fn)
> fn->gimple_df->decls_to_pointers = NULL;
> fn->gimple_df->modified_noreturn_calls = NULL;
> fn->gimple_df = NULL;
> +
> + /* We no longer need the edge variable maps. */
> + redirect_edge_var_map_destroy ();
> }
>
> /* Return true if EXPR is a useless type conversion, otherwise return
>
>