https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119229
Bug ID: 119229 Summary: ICE with gcobol -flto (in get_partitioning_class, at symtab.cc:2190) Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, lto Severity: normal Priority: P3 Component: cobol Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- a.cob (copied from some example online, no idea what is/isn't good COBOL yet): ``` IDENTIFICATION DIVISION. PROGRAM-ID. CobolGreeting. *>Program to display COBOL greetings DATA DIVISION. WORKING-STORAGE SECTION. 01 IterNum PIC 9 VALUE 5. PROCEDURE DIVISION. BeginProgram. PERFORM DisplayGreeting IterNum TIMES. STOP RUN. DisplayGreeting. DISPLAY "Greetings from COBOL". ``` ``` $ gcobol a.cob -flto during IPA pass: modref cobol1: internal compiler error: in get_partitioning_class, at symtab.cc:2190 0x57f656c249fe internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:517 0x57f656c24b99 fancy_abort(char const*, int, char const*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1722 0x57f65553f4c3 symtab_node::get_partitioning_class() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/symtab.cc:2190 0x57f65753e444 lto_output_varpool_node /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-cgraph.cc:633 0x57f656dea234 output_symtab() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-cgraph.cc:1013 0x57f656de1f33 lto_output() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-streamer-out.cc:2907 0x57f657527465 write_lto /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2792 0x57f656ed709d ipa_write_summaries_1 /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2858 0x57f656ed709d ipa_write_summaries() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2913 0x57f656d11f09 ipa_passes /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2276 0x57f656d11f09 symbol_table::compile() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2351 0x57f65751f9d8 symbol_table::finalize_compilation_unit() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2603 ``` ``` Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/15/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/15 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python --enable-objc-gc --enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,cobol,m2,rust --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 15.0.9999 p, commit 9e712cac5576ed07beadba86b7f0d9e9dad76f8c' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-offload-defaulted --enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp --enable-libada --disable-cet --disable-systemtap --enable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-gxx-libcxx-include-dir=/usr/include/c++/v1 --with-build-config='bootstrap-O3 bootstrap-lto' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.1 20250311 (experimental) afb46540d3921e96c4cd7ba8fa2c8b0901759455 (Gentoo Hardened 15.0.9999 p, commit 9e712cac5576ed07beadba86b7f0d9e9dad76f8c) ```