https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128667

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

https://gcc.gnu.org/g:43f0223bb0056cc7223706dffcb4989c809d3d5c

commit r17-6485-g43f0223bb0056cc7223706dffcb4989c809d3d5c
Author: Yongqiang Tian <[email protected]>
Date:   Tue Nov 17 15:00:51 2026 +1100

    tree-cfg: Ignore debug statements when tracking coverage suppression
[PR128667]

    A debug statement marker outside #pragma GCC suppress_coverage ranges
    can split adjacent suppressed statements into separate basic blocks.
    These extra blocks survive CFG merging and change gcov CFG checksums
    when -g is added.

    Only update the suppression state for non-debug statements.  Add a
    regression test for an empty statement between two suppressed regions.

    Bootstrapped and regression tested on x86_64-pc-linux-gnu.  The focused
    test fails before the change and passes afterward.

    Assisted-by: OpenAI Codex 5.6 Sol, co-reviewed by Claude and Yongqiang
Tian.

            PR gcov-profile/128667

    gcc/ChangeLog:

            * tree-cfg.cc (make_blocks_1): Do not update coverage suppression
            state for debug statements.

    gcc/testsuite/ChangeLog:

            * gcc.misc-tests/gcov-pr128667.c: New test.

    Signed-off-by: Yongqiang Tian <[email protected]>

Reply via email to