https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123865
Bug ID: 123865
Summary: ICE: in lto_output_edge, at lto-cgraph.cc:299 with
-flto and [[reproducible]]
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: lto
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 63513
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63513&action=edit
auto-reduced testcase (from gcc testsuite)
Compiler output:
$ x86_64-pc-linux-gnu-gcc -flto attr-reproducible-1.i
during IPA pass: modref
attr-reproducible-1.i:2:1: internal compiler error: in lto_output_edge, at
lto-cgraph.cc:299
2 | void g() { fp1(4); }
| ^~~~
0x2c97cfd internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xe2bbd9 fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1812
0x84b560 lto_output_edge
/repo/gcc-trunk/gcc/lto-cgraph.cc:299
0x142aa4d output_outgoing_cgraph_edges
/repo/gcc-trunk/gcc/lto-cgraph.cc:767
0x142aa4d output_outgoing_cgraph_edges
/repo/gcc-trunk/gcc/lto-cgraph.cc:755
0x142aa4d output_symtab()
/repo/gcc-trunk/gcc/lto-cgraph.cc:1073
0x1440703 lto_output()
/repo/gcc-trunk/gcc/lto-streamer-out.cc:2918
0x14df789 write_lto
/repo/gcc-trunk/gcc/passes.cc:2793
0x14df789 ipa_write_summaries_1
/repo/gcc-trunk/gcc/passes.cc:2859
0x14df789 ipa_write_summaries()
/repo/gcc-trunk/gcc/passes.cc:2919
0x105abf5 ipa_passes
/repo/gcc-trunk/gcc/cgraphunit.cc:2289
0x105abf5 symbol_table::compile()
/repo/gcc-trunk/gcc/cgraphunit.cc:2364
0x105e162 symbol_table::compile()
/repo/gcc-trunk/gcc/cgraphunit.cc:2342
0x105e162 symbol_table::finalize_compilation_unit()
/repo/gcc-trunk/gcc/cgraphunit.cc:2623
/repo/gcc-trunk/binary-trunk-20260128150544-r16-7117-g3090d28ab359e8-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/cc1
-fpreprocessed attr-reproducible-1.i -quiet -dumpdir a- -dumpbase
attr-reproducible-1.i -dumpbase-ext .i -mtune=generic -march=x86-64 -flto -o
/tmp/cchD9vVE.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-20260128150544-r16-7117-g3090d28ab359e8-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-20260128150544-r16-7117-g3090d28ab359e8-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260128 (experimental) (GCC)