aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.cc
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2024-09-06 14:12:53 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2024-09-06 14:15:43 +0200
commite98ad6a049c96c21cf641954584c2f5b7df0ce93 (patch)
treefee2fe7aca6977c19e39f4c99cb00bff4b0cea97 /gcc/gcov.cc
parentea9d4bf45ef906b990abdb101297e34366059f1c (diff)
downloadgcc-e98ad6a049c96c21cf641954584c2f5b7df0ce93.zip
gcc-e98ad6a049c96c21cf641954584c2f5b7df0ce93.tar.gz
gcc-e98ad6a049c96c21cf641954584c2f5b7df0ce93.tar.bz2
ipa: Treat static constructors and destructors as non-local (PR 115815)
In PR 115815, IPA-SRA thought it had control over all invocations of a (recursive) static destructor but it did not see the implied invocation which led to the original being left behind and the clean-up code encountering uses of SSAs that definitely should have been dead. Fixed by teaching cgraph_node::can_be_local_p about static constructors and destructors. Similar test is missing in cgraph_node::local_p so I added the check there as well. gcc/ChangeLog: 2024-07-25 Martin Jambor <mjambor@suse.cz> PR ipa/115815 * cgraph.cc (cgraph_node_cannot_be_local_p_1): Also check DECL_STATIC_CONSTRUCTOR and DECL_STATIC_DESTRUCTOR. * ipa-visibility.cc (non_local_p): Likewise. (cgraph_node::local_p): Delete extraneous line of tabs. gcc/testsuite/ChangeLog: 2024-07-25 Martin Jambor <mjambor@suse.cz> PR ipa/115815 * gcc.dg/lto/pr115815_0.c: New test.
Diffstat (limited to 'gcc/gcov.cc')
0 files changed, 0 insertions, 0 deletions