Restore input_location after recursive expand_call_inline
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 4 Jan 2021 10:35:31 +0000 (11:35 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Tue, 5 Jan 2021 09:57:54 +0000 (10:57 +0100)
This is just a precautionary fix.

2021-01-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>

* tree-inline.c (expand_call_inline): Restore input_location.
Return result from recursive call.

gcc/tree-inline.c

index de676d418f30e45a7ef599afd6da01cc2c8d5ba6..cd3fad1fa98a5862f8a48931072dd91a96139dd6 100644 (file)
@@ -4840,9 +4840,11 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id,
       gimple_call_set_fndecl (stmt, edge->callee->decl);
       update_stmt (stmt);
       id->src_node->remove ();
-      expand_call_inline (bb, stmt, id, to_purge);
+      successfully_inlined = expand_call_inline (bb, stmt, id, to_purge);
       maybe_remove_unused_call_args (cfun, stmt);
-      return true;
+      /* This used to return true even though we do fail to inline in
+        some cases.  See PR98525.  */
+      goto egress;
     }
   fn = cg_edge->callee->decl;
   cg_edge->callee->get_untransformed_body ();