public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
@ 2024-02-11 14:40 tanksherman27 at gmail dot com
  2024-02-11 15:55 ` [Bug lto/113875] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tanksherman27 at gmail dot com @ 2024-02-11 14:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

            Bug ID: 113875
           Summary: g++ crash with Internal Compiler Error when compiling
                    HotSpot for Windows with -Os and -flto
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tanksherman27 at gmail dot com
  Target Milestone: ---

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/113875] g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
  2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
@ 2024-02-11 15:55 ` pinskia at gcc dot gnu.org
  2024-02-11 15:57 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 15:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-02-11
           Keywords|                            |ice-on-valid-code, lto
            Version|unknown                     |13.2.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/113875] g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
  2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
  2024-02-11 15:55 ` [Bug lto/113875] " pinskia at gcc dot gnu.org
@ 2024-02-11 15:57 ` pinskia at gcc dot gnu.org
  2024-02-11 15:58 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 15:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/113875] g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
  2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
  2024-02-11 15:55 ` [Bug lto/113875] " pinskia at gcc dot gnu.org
  2024-02-11 15:57 ` pinskia at gcc dot gnu.org
@ 2024-02-11 15:58 ` pinskia at gcc dot gnu.org
  2024-02-11 16:09 ` tanksherman27 at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 15:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=108383

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Maybe a dup of bug 108383 due to -Os enabling -fdeclone-ctor-dtor .

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/113875] g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
  2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
                   ` (2 preceding siblings ...)
  2024-02-11 15:58 ` pinskia at gcc dot gnu.org
@ 2024-02-11 16:09 ` tanksherman27 at gmail dot com
  2024-02-11 16:40 ` ivanka2012 at gmail dot com
  2024-02-11 16:57 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: tanksherman27 at gmail dot com @ 2024-02-11 16:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

--- Comment #3 from Julian Waters <tanksherman27 at gmail dot com> ---
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/113875] g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
  2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
                   ` (3 preceding siblings ...)
  2024-02-11 16:09 ` tanksherman27 at gmail dot com
@ 2024-02-11 16:40 ` ivanka2012 at gmail dot com
  2024-02-11 16:57 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ivanka2012 at gmail dot com @ 2024-02-11 16:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

Ivan <ivanka2012 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ivanka2012 at gmail dot com

--- Comment #4 from Ivan <ivanka2012 at gmail dot com> ---
Also a dupe of 106103

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/113875] g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto
  2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
                   ` (4 preceding siblings ...)
  2024-02-11 16:40 ` ivanka2012 at gmail dot com
@ 2024-02-11 16:57 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 16:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113875

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 106103.

*** This bug has been marked as a duplicate of bug 106103 ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-11 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 14:40 [Bug lto/113875] New: g++ crash with Internal Compiler Error when compiling HotSpot for Windows with -Os and -flto tanksherman27 at gmail dot com
2024-02-11 15:55 ` [Bug lto/113875] " pinskia at gcc dot gnu.org
2024-02-11 15:57 ` pinskia at gcc dot gnu.org
2024-02-11 15:58 ` pinskia at gcc dot gnu.org
2024-02-11 16:09 ` tanksherman27 at gmail dot com
2024-02-11 16:40 ` ivanka2012 at gmail dot com
2024-02-11 16:57 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).