[Bug ipa/93621] [10 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.c:1443 since r10-5567
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 16 17:21:36 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93621
--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:7123347c8b44571811c4b58506b06fb09969bccb
commit r10-7760-g7123347c8b44571811c4b58506b06fb09969bccb
Author: Martin Jambor <mjambor@suse.cz>
Date: Thu Apr 16 19:21:02 2020 +0200
ipa: Make call redirection detect already adjusted calls (PR 93621)
PR 93621 testcase makes redirect_call_stmt_to_callee wrongly assume
that a call statement needs redirecting but then rightly fails an
assert ensuring the call statement parameters have not already been
adjusted because they were already created adjusted as part of thunk
expansion.
The test fails because the decl in the call call statement is
different than the decl of the callee, because the latter was created
in save_inline_function_body. This patch adds a way to link these two
and detect the situation in redirect_call_stmt_to_callee.
2020-04-16 Martin Jambor <mjambor@suse.cz>
PR ipa/93621
* ipa-inline.h (ipa_saved_clone_sources): Declare.
* ipa-inline-transform.c (ipa_saved_clone_sources): New variable.
(save_inline_function_body): Link the new body holder with the
previous one.
* cgraph.c: Include ipa-inline.h.
(cgraph_edge::redirect_call_stmt_to_callee): Try to find the decl
from
the statement in ipa_saved_clone_sources.
* cgraphunit.c: Include ipa-inline.h.
(expand_all_functions): Free ipa_saved_clone_sources.
testsuite/
* g++.dg/ipa/pr93621.C: New test.
More information about the Gcc-bugs
mailing list