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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Liska
<mar...@gcc.gnu.org>:

https://gcc.gnu.org/g:7b879564ec2bda6b5441fbaf231d70ec6359db01

commit r11-9896-g7b879564ec2bda6b5441fbaf231d70ec6359db01
Author: Sergei Trofimovich <siarh...@google.com>
Date:   Fri Apr 15 08:35:27 2022 +0100

    gcov-profile: Allow negative counts of indirect calls [PR105282]

    TOPN metrics are histograms that contain overall count and per-bucket
    count. Overall count can be negative when two profiles merge and some
    of per-bucket metrics are disacarded.

    Noticed as an ICE on python PGO build where gcc crashes as:

        during IPA pass: modref
        a.c:36:1: ICE: in stream_out_histogram_value, at value-prof.cc:340
           36 | }
              | ^
        stream_out_histogram_value(output_block*, histogram_value_t*)
                gcc/value-prof.c:340

    gcc/ChangeLog:

            PR gcov-profile/105282
            * value-prof.c (stream_out_histogram_value): Allow negative counts
            on HIST_TYPE_INDIR_CALL.

    (cherry picked from commit 90a29845bfe7d6002e6c2fd49a97820b00fbc4a3)

Reply via email to