https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117090
Bug ID: 117090 Summary: gcov-tool ICE when merging two profiles Product: gcc Version: 12.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: shahzad.malik.muzaffar at cern dot ch Target Milestone: --- Hi, I am trying to build my application using Profile guided optimization. Application has multiple configurations so I have to run it multiple times to generate the profiles. When I try to merge these profiles then gcov-tool crashes with error. I have attached the two set of profiles here. --------- > gcov-tool merge -o merge cms-pgo/profile2 cms-pgo/profile3 gcov-tool: internal compiler error: in write_topn_counters, at ../libgcc/libgcov-driver.c:426 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://gcc.gnu.org/bugs/> for instructions. --------- I have built and run my application on AlmaLinux8/x86_64 using GCC 12.3.1 [a] and application was built with lto "-flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr" and PGO flags "-fprofile-prefix-path=/app/path -fprofile-update=prefer-atomic -fprofile-correction -fprofile-generate=%q{CMSSW_PGO_DIRECTORY}" Any idea why gcov-tool can not merge these profiles? Thanks, --Shahzad [a] > uname -a Linux hostname.cern.ch 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 8 07:11:46 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux > gcc -v Target: x86_64-redhat-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.3.1 20230527 (GCC)