diff options
author | Jakub Jelinek <jakub@redhat.com> | 2025-04-04 20:53:19 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2025-04-04 20:53:19 +0200 |
commit | c89714d9df3ad8dd6b79946da85f5e276aba83db (patch) | |
tree | 9c83462fffdcfffccef448adbad019b6f4e6601f /libjava/classpath/lib/java/lang/Appendable.class | |
parent | d060d7a3ddc1c782e2800b1f68a2eb8f0de1fc32 (diff) | |
download | gcc-c89714d9df3ad8dd6b79946da85f5e276aba83db.zip gcc-c89714d9df3ad8dd6b79946da85f5e276aba83db.tar.gz gcc-c89714d9df3ad8dd6b79946da85f5e276aba83db.tar.bz2 |
profile: Another musttail fix [PR119618]
As the following testcase shows, sometimes we can have debug stmts
after a musttail call and profile.cc in that case would incorrectly
allow the edge from that, causing musttail error and -fcompare-debug
failure (because if there are no debug stmts after it, then musttail
is found there and the edge is ignored).
The following patch uses gsi_last_nondebug_bb instead of gsi_last_bb
to find the musttail call. And so that we don't uselessly skip over
debug stmts at the end of many bbs, the patch limits it to
cfun->has_musttail functions.
2025-04-04 Jakub Jelinek <jakub@redhat.com>
PR gcov-profile/119618
* profile.cc (branch_prob): Only check for musttail calls if
cfun->has_musttail. Use gsi_last_nondebug_bb instead of gsi_last_bb.
* c-c++-common/pr119618.c: New test.
Diffstat (limited to 'libjava/classpath/lib/java/lang/Appendable.class')
0 files changed, 0 insertions, 0 deletions