aboutsummaryrefslogtreecommitdiff
path: root/maintainer-scripts
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2020-04-30 17:59:00 +0200
committerMartin Jambor <mjambor@suse.cz>2020-04-30 17:59:00 +0200
commitb31ede6e376302047830691fe6249be3ade0a2c0 (patch)
treeb3ea9ae9cabea1c720cac33f517eb7de06ddd9ec /maintainer-scripts
parent46eed414a332f7684a9d8f07c0f7e94b8cc2659e (diff)
downloadgcc-b31ede6e376302047830691fe6249be3ade0a2c0.zip
gcc-b31ede6e376302047830691fe6249be3ade0a2c0.tar.gz
gcc-b31ede6e376302047830691fe6249be3ade0a2c0.tar.bz2
ipa: Cgraph verification fix (PR 94856)
PR 94856 is a call graph verifier error. We have a method which (in the course of IPA-CP) loses its this pointer because it is unused and the pass then does not clone all the this adjusting thunks and just makes the calls go straight to the new clone - and then the verifier complains that the edge does not seem to point to a clone of what it used to. This looked weird because the verifier actually has logic detecting this case but it turns out that it is confused by inliner body-saving mechanism which invents a new decl for the base function. Making the inlining body-saving mechanism to correctly set former_clone_of allows us to detect this case too. Then we pass this particular round of verification but the subsequent one fails because we have inlined the function into its former thunk - which subsequently does not have any callees, but the verifier still access them and segfaults. Therefore the patch also adds a test whether the a former hunk even has any call. 2020-04-30 Martin Jambor <mjambor@suse.cz> PR ipa/94856 * cgraph.c (clone_of_p): Also consider thunks whih had their bodies saved by the inliner and thunks which had their call inlined. * ipa-inline-transform.c (save_inline_function_body): Fill in former_clone_of of new body holders. PR ipa/94856 * g++.dg/ipa/pr94856.C: New test.
Diffstat (limited to 'maintainer-scripts')
0 files changed, 0 insertions, 0 deletions