https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91969
Bug ID: 91969 Summary: Compiling testsuite/g++.dg/ipa/pr85421.C with -fdump-ipa-inline ICEs Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux Target: x86_64-linux If you compile testsuite/g++.dg/ipa/pr85421.C with -fdump-ipa-inline, the compiler hits an assert gcc_checking_assert(initialized_p()) in profile_count::to_gcov_type(): $ /home/mjambor/gcc/icln/obj/gcc/testsuite/g++/../../xg++ -B/home/mjambor/gcc/icln/obj/gcc/testsuite/g++/../../ /home/mjambor/gcc/icln/src/gcc/testsuite/g++.dg/ipa/pr85421.C -nostdinc++ -I/home/mjambor/gcc/icln/obj/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/mjambor/gcc/icln/obj/x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/mjambor/gcc/icln/src/libstdc++-v3/libsupc++ -I/home/mjambor/gcc/icln/src/libstdc++-v3/include/backward -I/home/mjambor/gcc/icln/src/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -std=gnu++1y -w -S -o pr85421.s -fdump-ipa-inline during IPA pass: inline /home/mjambor/gcc/icln/src/gcc/testsuite/g++.dg/ipa/pr85421.C:131:1: internal compiler error: in to_gcov_type, at profile-count.h:757 131 | } // namespace bk | ^ 0xd64624 profile_count::to_gcov_type() const /home/mjambor/gcc/icln/src/gcc/profile-count.h:757 0x21d73f1 recursive_inlining /home/mjambor/gcc/icln/src/gcc/ipa-inline.c:1554 0x21d8b50 inline_small_functions /home/mjambor/gcc/icln/src/gcc/ipa-inline.c:2039 0x21da828 ipa_inline /home/mjambor/gcc/icln/src/gcc/ipa-inline.c:2550 0x21db6cc execute /home/mjambor/gcc/icln/src/gcc/ipa-inline.c:2958 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. This happens when GCC attempts to dump stuff in recursive_inlining when it attempts to dump count of cgraph_edge: <cgraph_edge _ZThn16_N2bk2cq2cdENS_2byE/45 -> *.LTHUNK0/8>