When compiling the Java HotSpot VM for Windows, g++ crashes with an Internal Compiler Error if the optimization level is set to SIZE (Aka -Os): during GIMPLE pass: dse src/hotspot/share/runtime/continuationFreezeThaw.cpp: In function 'freeze_epilog.isra': src/hotspot/share/runtime/continuationFreezeThaw.cpp:1544:12: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:383: C:\msys64\tmp\cc602ZS3.ltrans127.ltrans.o] Error 1 make[4]: *** Waiting for unfinished jobs.... during GIMPLE pass: dse ad_x86_gen.cpp: In member function 'MachNodeGenerator': ad_x86_gen.cpp:508:11: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:41: C:\msys64\tmp\cc602ZS3.ltrans13.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp: In function 'details.isra': src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:312:6: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:377: C:\msys64\tmp\cc602ZS3.ltrans125.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/classfile/verifier.cpp: In member function 'get_newarray_type.isra': src/hotspot/share/classfile/verifier.cpp:3003: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:371: C:\msys64\tmp\cc602ZS3.ltrans123.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp: In function 'fill_continuation_entry.constprop': src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp:1326: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:368: C:\msys64\tmp\cc602ZS3.ltrans122.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/prims/jni.cpp: In function 'jni_MonitorEnter': src/hotspot/share/prims/jni.cpp:2712: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:191: C:\msys64\tmp\cc602ZS3.ltrans63.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/cpu/x86/c1_Runtime1_x86.cpp: In member function 'restore_live_registers_except_rax.constprop': src/hotspot/cpu/x86/c1_Runtime1_x86.cpp:568:6: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. during GIMPLE pass: dse src/hotspot/cpu/x86/macroAssembler_x86_sha.cpp: In member function 'addm.constprop': src/hotspot/cpu/x86/macroAssembler_x86_sha.cpp:670: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:365: C:\msys64\tmp\cc602ZS3.ltrans121.ltrans.o] Error 1 make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:362: C:\msys64\tmp\cc602ZS3.ltrans120.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/gc/g1/g1ParScanThreadState.cpp: In member function 'steal_and_trim_queue': src/hotspot/share/gc/g1/g1ParScanThreadState.cpp:322:6: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:152: C:\msys64\tmp\cc602ZS3.ltrans50.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/opto/loopTransform.cpp: In member function 'do_range_check.isra': src/hotspot/share/opto/loopTransform.cpp:2862: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:374: C:\msys64\tmp\cc602ZS3.ltrans124.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp: In member function 'do_nmethod': src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp:850: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:293: C:\msys64\tmp\cc602ZS3.ltrans97.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/gc/shared/gcTraceTime.inline.hpp: In member function '__ct .constprop': src/hotspot/share/gc/shared/gcTraceTime.inline.hpp:187: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:356: C:\msys64\tmp\cc602ZS3.ltrans118.ltrans.o] Error 1 during GIMPLE pass: dse src/hotspot/share/gc/g1/g1ParScanThreadState.cpp: In member function 'trim_queue_to_threshold': src/hotspot/share/gc/g1/g1ParScanThreadState.cpp:307:6: internal compiler error: in binds_to_current_def_p, at symtab.cc:2497 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/msys2/MINGW-packages/issues> for instructions. make[4]: *** [C:\msys64\tmp\ccxx3n9d.mk:149: C:\msys64\tmp\cc602ZS3.ltrans49.ltrans.o] Error 1 lto-wrapper.exe: fatal error: make returned 2 exit status compilation terminated. C:/msys64/ucrt64/lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: error: lto-wrapper failed collect2.exe: error: ld returned 1 exit status The compiled methods in HotSpot that g++ crashes on are different every time, so I didn't include them here (There are way too many of them too). The linker command line for linking it is: /c/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/build/windows-x86_64-server-release/fixpath -m exec /ucrt64/bin/g++.exe -Wl,--no-undefined -fno-stack-protector -Wl,--exclude-all-symbols -Wl,--subsystem,windows -m64 -static-libstdc++ -static-libgcc -shared -Os -flto=15 -fuse-linker-plugin -fno-strict-aliasing -m64 -Wl,-version-script=/c/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/mapfile -Wl,--pdb=/c/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/build/windows-x86_64-server-release/support/modules_libs/java.base/server/jvm.dll.pdb -Wl,-soname=jvm.dll -o /c/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/build/windows-x86_64-server-release/support/modules_libs/java.base/server/jvm.dll @/c/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objects/_BUILD_LIBJVM_objectfilenames.txt /c/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objects/jvm.dll.res -lpowrprof -lws2_32 -lwinmm -lversion -lpsapi (fixpath is merely a wrapper for converting Windows paths to Unix paths, and shouldn't matter)
Can you read https://gcc.gnu.org/bugs/ can get back to us on what is requested? Also https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction?highlight=%28reduction%29#Reducing_LTO_bugs might be useful too.
Maybe a dup of bug 108383 due to -Os enabling -fdeclone-ctor-dtor .
Compiler configure options as requested by the gcc bug site: $ gcc -v Using built-in specs. COLLECT_GCC=C:\msys64\ucrt64\bin\gcc.exe COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-13.2.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --with-build-config=bootstrap-lto --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++ --enable-shared --enable-static --enable-libatomic --enable-threads=win32 --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++ Thread model: win32 Supported LTO compression algorithms: zlib zstd gcc version 13.2.0 (Rev3, Built by MSYS2 project) I don't know if obtaining a preprocessed .i file is possible, since this crash happens with the linker command line and also due to the sheer volume of source files that are involved
Also a dupe of 106103
Dup of bug 106103. *** This bug has been marked as a duplicate of bug 106103 ***