aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2022-03-10 14:49:23 +0100
committerMartin Jambor <mjambor@suse.cz>2022-03-10 14:50:54 +0100
commite671e48e352ee278d816d4633146208807a0e403 (patch)
treed3f8d1b5c97d31ca8a68c953618831280844347b /gcc/fortran
parentee34ffa429a399f292ad1421333721a92b998772 (diff)
downloadgcc-e671e48e352ee278d816d4633146208807a0e403.zip
gcc-e671e48e352ee278d816d4633146208807a0e403.tar.gz
gcc-e671e48e352ee278d816d4633146208807a0e403.tar.bz2
ipa-cp: Avoid adjusting references through self-recursion (PR 104813)
When writing the patch that downgrades address-taken references to load references when IPA-CP can prove that all uses of the taken address ends up in loads, I unfortunately did not take into account that find_more_scalar_values_for_callers_subset now happily adds self-recursive edges to the set of callers which should be immediately redirected (originally recursion was meant to be handled as edge redirection in a second pass over the SCC). The code as it is can now decrement the referece counters too many times. This can remedied by removing self-recursive edges earlier, we already do it because of thunk expansion issues, and so this patch does exactly that. gcc/ChangeLog: 2022-03-07 Martin Jambor <mjambor@suse.cz> PR ipa/104813 * ipa-cp.cc (create_specialized_node): Move removal of self-recursive calls from callers vector before refrence adjustments. gcc/testsuite/ChangeLog: 2022-03-07 Martin Jambor <mjambor@suse.cz> PR ipa/104813 * gcc.dg/ipa/pr104813.c: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions