This is the mail archive of the
mailing list for the GCC project.
[lto] fix stmt.c:expand_return ICE
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: zadeck at naturalbridge dot com
- Date: Fri, 30 Nov 2007 11:16:47 -0800
- Subject: [lto] fix stmt.c:expand_return ICE
Hopefully, this is the last flag we have to worry about serializing
The cause of the ICE is that variables of COMPLEX type were not getting
this flag set correctly--specifically RESULT_DECLs of COMPLEX type. As a
result, RETURN_EXPRs with GIMPLE_MODIFY_STMTs setting SSA_NAMEs or
RESULT_DECLs (whew!) were not being given real SSA operands correctly.
Which, in turn, meant that the out-of-ssa pass didn't realize that the
RETURN_EXPR contained SSA_NAMEs that needed to be changed, ultimately
leading to expand_return receiving something it did not expect to see.
The FIXME is a note for reminding us what we will want to do later.
Committed to the LTO branch.
* lto-tree-flags.def (RESULT_DECL): Add gimple_reg_flag.
* lto.c (lto_materialize_function): Add FIXME.
--- gcc/lto-tree-flags.def (revision 130517)
+++ gcc/lto-tree-flags.def (working copy)
@@ -586,6 +586,7 @@
+ ADD_DECL_FLAG (gimple_reg_flag)
--- gcc/lto/lto.c (revision 130517)
+++ gcc/lto/lto.c (working copy)
@@ -2417,6 +2417,15 @@ lto_materialize_function (lto_info_fd *f
/* cgraph expects this to be called once for each function. */
+ /* FIXME: eventually, reading LTO files should rebuild SSA
+ perfectly so that things like the extra referenced_vars pass
+ and rebuild_ssa_for_lto can go away. Before that happens, this
+ call needs to be moved earlier in the materialization
+ process--probably to lto-read.c:input_cfg or before. We could
+ move it there now, but the current state means that we would do
+ useless work while reading in LTO files--building SSA operands
+ once while reading and then rebuilding again during
+ rebuild_ssa_for_lto. */
cgraph_finalize_function (decl, /*nested=*/false);