https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117166
Bug ID: 117166 Summary: [15 regression] ICE when building lxml-5.3.0 with LTO (linemap_line_start, at libcpp/line-map.cc:949) Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: needs-testcase Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- ``` $ x86_64-pc-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O3 -march=native -mtls-dialect=gnu2 -flto=jobserver -fno-semantic-interposition -pipe -fcf-protection=none -fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-switches -fdiagnostics-explain-harder -Wa,-O2 -Wa,-mtune=znver2 -Warray-bounds=2 -Wstrict-aliasing -Wfree-nonheap-object -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -Wstrict-aliasing -Wfree-nonheap-object -Wbuiltin-declaration-mismatch -Wformat -Werror=format-security -DNDEBUG -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.13 -c src/lxml/etree.c -o /var/tmp/portage/dev-python/lxml-5.3.0/work/lxml-lxml-5.3.0-python3_13/build/temp.linux-x86_64-cpython-313/src/lxml/etree.o $ x86_64-pc-linux-gnu-gcc -shared -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -fdiagnostics-color=always -fuse-ld=mold -flto=jobserver -Wl,--defsym=__gentoo_check_ldflags__=0 -O3 -march=native -mtls-dialect=gnu2 -flto=jobserver -fno-semantic-interposition -pipe -fcf-protection=none -fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-switches -fdiagnostics-explain-harder -Wa,-O2 -Wa,-mtune=znver2 -Warray-bounds=2 -Wstrict-aliasing -Wfree-nonheap-object -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -Wstrict-aliasing -Wfree-nonheap-object -Wbuiltin-declaration-mismatch -Wformat -Werror=format-security -DNDEBUG /var/tmp/portage/dev-python/lxml-5.3.0/work/lxml-lxml-5.3.0-python3_13/build/temp.linux-x86_64-cpython-313/src/lxml/etree.o -L/usr/lib64 -lxslt -lexslt -lxml2 -lrt -lz -lm -o /var/tmp/portage/dev-python/lxml-5.3.0/work/lxml-lxml-5.3.0-python3_13/build/lib.linux-x86_64-cpython-313/lxml/etree.cpython-313-x86_64-linux-gnu.so In function ‘__pyx_getprop_4lxml_5etree_13_BaseErrorLog_last_error’: lto1: internal compiler error: in linemap_line_start, at libcpp/line-map.cc:949 0x6538b4d2dc63 internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:517 0x6538b4d0b7e2 fancy_abort(char const*, int, char const*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1535 0x6538b359a0e9 linemap_line_start(line_maps*, unsigned int, unsigned int) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/libcpp/line-map.cc:949 0x6538b4eaf1a0 lto_location_cache::apply_location_cache() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-streamer-in.cc:455 0x6538b56db602 input_function /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-streamer-in.cc:1438 0x6538b56db602 lto_read_body_or_constructor /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-streamer-in.cc:1646 0x6538b56db602 lto_input_variable_constructor(lto_file_decl_data*, varpool_node*, char const*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto-streamer-in.cc:1705 0x6538b4f5ea48 cgraph_node::get_untransformed_body() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraph.cc:4087 0x6538b4f5dba4 cgraph_node::expand() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:1816 0x6538b4ee63a5 expand_all_functions /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2028 0x6538b4ee63a5 symbol_table::compile() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2404 0x6538b56aa0c0 lto_main() /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/lto/lto.cc:691 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. ``` Preprocessed source doesn't reproduce it, so I'll try cut it down now.