[Bug ipa/92109] [10 Regression] ICE in modify_call_stmt, at ipa-param-manipulation.c:1586

jamborm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 20 18:08:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92109

--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
So this helps:

diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index bfcebb20495..359ea53d8a6 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -1079,6 +1079,7 @@ symbol_table::materialize_all_clones (void)
       FOR_EACH_FUNCTION (node)
         {
          if (node->clone_of && node->decl != node->clone_of->decl
+             && !node->in_other_partition
              && !gimple_has_body_p (node->decl))
            {
              if (!node->clone_of->clone_of)


but I a doubt it is a safe thing to do (inline clones of a clone
probably can happen to be in a different ltrans than the offline clone
and then this will break) but it IMHO shows that the materialization
of this clone in this ltrans in this particular case is useless.

Hm, perhaps the following should work?

diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index bfcebb20495..cc689d3d386 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -1079,6 +1079,7 @@ symbol_table::materialize_all_clones (void)
       FOR_EACH_FUNCTION (node)
         {
          if (node->clone_of && node->decl != node->clone_of->decl
+             && (!node->body_removed || !node->in_other_partition)
              && !gimple_has_body_p (node->decl))
            {
              if (!node->clone_of->clone_of)

I'll see what breaks when I change the flag body_removed to mean what
it says (i.e. node->release_body really was called) first though.


More information about the Gcc-bugs mailing list