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/65600] [5 Regression] bost testsuite failure: ICE: Segmentation fault


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

--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> ---
Oops, really hope this is last one  of this can of worms :(
The problem here is that resolve_speculation assumes the cgraph node exists. I
am testing the following:

Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c    (revision 221725)
+++ ipa-inline-analysis.c    (working copy)
@@ -766,15 +766,15 @@ static struct cgraph_edge *
 redirect_to_unreachable (struct cgraph_edge *e)
 {
   struct cgraph_node *callee = !e->inline_failed ? e->callee : NULL;
+  struct cgraph_node *target = cgraph_node::get_create
+              (builtin_decl_implicit (BUILT_IN_UNREACHABLE));

   if (e->speculative)
-    e = e->resolve_speculation (builtin_decl_implicit (BUILT_IN_UNREACHABLE));
+    e = e->resolve_speculation (target->decl);
   else if (!e->callee)
-    e->make_direct (cgraph_node::get_create
-              (builtin_decl_implicit (BUILT_IN_UNREACHABLE)));
+    e->make_direct (target);
   else
-    e->redirect_callee (cgraph_node::get_create
-            (builtin_decl_implicit (BUILT_IN_UNREACHABLE)));
+    e->redirect_callee (target);
   struct inline_edge_summary *es = inline_edge_summary (e);
   e->inline_failed = CIF_UNREACHABLE;
   e->frequency = 0;


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