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

            Bug ID: 124462
           Summary: [16 Regression] during IPA pass: profile ICE: in
                    operator[], at vec.h:911 with -fcondition-coverage
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 63906
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63906&action=edit
auto-reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fcondition-coverage testcase.C
during IPA pass: profile
testcase.C: In function 'auto vformat()':
testcase.C:19:1: internal compiler error: in operator[], at vec.h:911
   19 | }
      | ^
0x3024afd internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xf23a0f fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x9d417c vec<basic_block_def*, va_heap, vl_embed>::operator[](unsigned int)
        /repo/gcc-trunk/gcc/vec.h:911
0x9d4a26 vec<edge_def*, va_heap, vl_embed>::operator[](unsigned int)
        /repo/gcc-trunk/gcc/tree-profile.cc:476
0x9d4a26 vec<edge_def*, va_heap, vl_ptr>::operator[](unsigned int)
        /repo/gcc-trunk/gcc/vec.h:1610
0x9d4a26 masking_vectors
        /repo/gcc-trunk/gcc/tree-profile.cc:549
0x9d4a26 find_conditions(function*)
        /repo/gcc-trunk/gcc/tree-profile.cc:949
0x18a0354 branch_prob(bool)
        /repo/gcc-trunk/gcc/profile.cc:1617
0x1abd57c tree_profiling
        /repo/gcc-trunk/gcc/tree-profile.cc:1969
0x1abd57c execute
        /repo/gcc-trunk/gcc/tree-profile.cc:2099
/repo/gcc-trunk/binary-trunk-20260312102416-r16-8033-ge397f2547a66d0-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/cc1plus
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260312102416-r16-8033-ge397f2547a66d0-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/16.0.1/
-D_GNU_SOURCE testcase.C -quiet -dumpdir a- -dumpbase testcase.C -dumpbase-ext
.C -mtune=generic -march=x86-64 -O -fcondition-coverage -o /tmp/ccNByVef.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260312102416-r16-8033-ge397f2547a66d0-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260312102416-r16-8033-ge397f2547a66d0-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260312 (experimental) (GCC)

Reply via email to