This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/63580] [5 Regression] ICE : error: invalid argument to gimple call


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

--- Comment #4 from Martin LiÅka <marxin at gcc dot gnu.org> ---
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 6f61f5c..89c96dc 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2342,6 +2342,14 @@ cgraph_node::create_wrapper (cgraph_node *target)

     cgraph_edge *e = create_edge (target, NULL, 0, CGRAPH_FREQ_BASE);

+    tree arguments = DECL_ARGUMENTS (decl);
+
+    while (arguments)
+      {
+       TREE_ADDRESSABLE (arguments) = false;
+       arguments = TREE_CHAIN (arguments);
+      }
+
     expand_thunk (false, true);
     e->call_stmt_cannot_inline_p = true;

Following patch fixed the issue, boostrap works without any regression.
But I guess it's just a partial fix. There's very similar issue: PR63573.

Thanks,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]