[Bug middle-end/68117] [6 Regression] error: invalid PHI argument <<< Unknown tree: <invalid tree code> >>>
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Tue Nov 17 14:58:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68117
--- Comment #35 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 17 Nov 2015, gary at intrepid dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68117
>
> --- Comment #34 from Gary Funck <gary at intrepid dot com> ---
> (In reply to Richard Biener from comment #33)
> > Can you try the patch attached to comment #29?
>
> That seemed to fix the issue in 32/libgfortran, though I haven't tried a build
> from scratch yet.
>
> Regarding the patch, in cfgexpand.c, I had to change the call to
> redirect_edge_var_map_empty() (was: redirect_edge_var_map_destroy).
> Note there is no ggc_collect() call there, it appears in other places
> in the patch.
Yes, I thought the cfgexpand.c place is a better one and the only one
that would be related to the place where I removed the old
redirect_edge_var_map_destroy call.
Hmm. Maybe not for functions removed by cgraph code.
Does
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 230428)
+++ gcc/function.c (working copy)
@@ -75,6 +75,7 @@ along with GCC; see the file COPYING3.
#include "tree-chkp.h"
#include "rtl-chkp.h"
#include "tree-dfa.h"
+#include "tree-ssa.h"
/* So we can assign to cfun in this file. */
#undef cfun
@@ -4759,6 +4760,7 @@ set_cfun (struct function *new_cfun)
if (cfun != new_cfun)
{
cfun = new_cfun;
+ redirect_edge_var_map_destroy ();
invoke_set_current_function_hook (new_cfun ? new_cfun->decl :
NULL_TREE);
}
}
help? (without the comment #29 patch)
Does the patch in comment #25 help?
More information about the Gcc-bugs
mailing list