public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
@ 2024-02-02  1:57 lehua.ding at rivai dot ai
  2024-02-02  2:18 ` [Bug lto/113712] " lehua.ding at rivai dot ai
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  1:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113712
           Summary: lto crash: when building 641.leela_s peek with
                    Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lehua.ding at rivai dot ai
  Target Milestone: ---

Commond:
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/build/x64-debug-gcc2-simple/install/bin/g++
    -std=c++03 -m64     -fprofile-generate  -g -Ofast -march=native -flto      
 -fopenmp -DSPEC_OPENMP  FullBoard.o KoState.o Playout.o TimeControl.o
UCTSearch.o GameState.o Leela.o SGFParser.o Timing.o Utils.o FastBoard.o
Matcher.o SGFTree.o TTable.o Zobrist.o FastState.o GTP.o MCOTable.o Random.o
SMP.o UCTNode.o                      -o leela_s

Backtrace:
lto1: internal compiler error: in add_symbol_to_partition_1, at
lto/lto-partition.cc:215
0x462426 add_symbol_to_partition_1
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto-partition.cc:215
0x4625f9 add_symbol_to_partition
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto-partition.cc:270
0x462274 add_symbol_to_partition_1
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto-partition.cc:180
0x4625f9 add_symbol_to_partition
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto-partition.cc:270
0x46325a lto_balanced_map(int, int)
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto-partition.cc:566
0x450653 do_whole_program_analysis
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto.cc:553
0x450870 lto_main()
       
/work/home/lding/open-source/riscv-gnu-toolchain-upstream/dev/gcc2/gcc/lto/lto.cc:666
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
@ 2024-02-02  2:18 ` lehua.ding at rivai dot ai
  2024-02-02  2:32 ` pinskia at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  2:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Lehua Ding <lehua.ding at rivai dot ai> ---
Reproduce steps:
1. download these object files(bugzilla has size limit):
https://github.com/lhtin/temp/raw/main/objects.zip
2. cd the object files dir and run the command: /path/to/your/g++ -std=c++03
-m64     -fprofile-generate  -g -Ofast -march=native -flto        -fopenmp
-DSPEC_OPENMP  FullBoard.o KoState.o Playout.o TimeControl.o UCTSearch.o
GameState.o Leela.o SGFParser.o Timing.o Utils.o FastBoard.o Matcher.o
SGFTree.o TTable.o Zobrist.o FastState.o GTP.o MCOTable.o Random.o SMP.o
UCTNode.o                      -o leela_s

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
  2024-02-02  2:18 ` [Bug lto/113712] " lehua.ding at rivai dot ai
@ 2024-02-02  2:32 ` pinskia at gcc dot gnu.org
  2024-02-02  3:22 ` lehua.ding at rivai dot ai
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  2:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Lehua Ding from comment #1)
> Reproduce steps:
> 1. download these object files(bugzilla has size limit):
> https://github.com/lhtin/temp/raw/main/objects.zip
> 2. cd the object files dir and run the command: /path/to/your/g++ -std=c++03
> -m64     -fprofile-generate  -g -Ofast -march=native -flto        -fopenmp
> -DSPEC_OPENMP  FullBoard.o KoState.o Playout.o TimeControl.o UCTSearch.o
> GameState.o Leela.o SGFParser.o Timing.o Utils.o FastBoard.o Matcher.o
> SGFTree.o TTable.o Zobrist.o FastState.o GTP.o MCOTable.o Random.o SMP.o
> UCTNode.o                      -o leela_s

Objects is not the best thing here. 

Maybe you can reproduce it using the upstream sources of leela?
https://github.com/gcp/Leela

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
  2024-02-02  2:18 ` [Bug lto/113712] " lehua.ding at rivai dot ai
  2024-02-02  2:32 ` pinskia at gcc dot gnu.org
@ 2024-02-02  3:22 ` lehua.ding at rivai dot ai
  2024-02-02  3:34 ` pinskia at gcc dot gnu.org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  3:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Lehua Ding <lehua.ding at rivai dot ai> ---
(In reply to Andrew Pinski from comment #2)
> (In reply to Lehua Ding from comment #1)
> > Reproduce steps:
> > 1. download these object files(bugzilla has size limit):
> > https://github.com/lhtin/temp/raw/main/objects.zip
> > 2. cd the object files dir and run the command: /path/to/your/g++ -std=c++03
> > -m64     -fprofile-generate  -g -Ofast -march=native -flto        -fopenmp
> > -DSPEC_OPENMP  FullBoard.o KoState.o Playout.o TimeControl.o UCTSearch.o
> > GameState.o Leela.o SGFParser.o Timing.o Utils.o FastBoard.o Matcher.o
> > SGFTree.o TTable.o Zobrist.o FastState.o GTP.o MCOTable.o Random.o SMP.o
> > UCTNode.o                      -o leela_s
> 
> Objects is not the best thing here. 
> 
> Maybe you can reproduce it using the upstream sources of leela?
> https://github.com/gcp/Leela

Yes, the best way is to build the case SPEC CPU 2017 641.leela_s directly.
Providing OBJECTS is another option to hopefully reproduce the problem more
quickly!

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (2 preceding siblings ...)
  2024-02-02  3:22 ` lehua.ding at rivai dot ai
@ 2024-02-02  3:34 ` pinskia at gcc dot gnu.org
  2024-02-02  4:09 ` lehua.ding at rivai dot ai
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  3:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-02-02
             Status|UNCONFIRMED                 |WAITING

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Objects is not very helpful at all for LTO issue since it might be the due to
output to objects.


Plus this is documented they are useful (from 
https://gcc.gnu.org/bugs.html):
Assembly files (*.s) produced by the compiler, or any binary files, such as
object files, executables, core files, or precompiled header files.

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (3 preceding siblings ...)
  2024-02-02  3:34 ` pinskia at gcc dot gnu.org
@ 2024-02-02  4:09 ` lehua.ding at rivai dot ai
  2024-02-02  4:11 ` lehua.ding at rivai dot ai
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  4:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Lehua Ding <lehua.ding at rivai dot ai> ---
Created attachment 57287
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57287&action=edit
All source file

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (4 preceding siblings ...)
  2024-02-02  4:09 ` lehua.ding at rivai dot ai
@ 2024-02-02  4:11 ` lehua.ding at rivai dot ai
  2024-02-02  4:33 ` pinskia at gcc dot gnu.org
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  4:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Lehua Ding <lehua.ding at rivai dot ai> ---
(In reply to Lehua Ding from comment #5)
> Created attachment 57287 [details]
> All source file

Decompress the attachment and cd to it, then you can reproduce by these
command:

g++     -std=c++03 -m64 -c -o Timing.o -DSPEC -DNDEBUG -I.  -fprofile-generate 
-g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Timing.cpp
g++     -std=c++03 -m64 -c -o Utils.o -DSPEC -DNDEBUG -I.  -fprofile-generate 
-g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Utils.cpp
g++     -std=c++03 -m64 -c -o TimeControl.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  TimeControl.cpp
g++     -std=c++03 -m64 -c -o FullBoard.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  FullBoard.cpp
g++     -std=c++03 -m64 -c -o Playout.o -DSPEC -DNDEBUG -I.  -fprofile-generate
 -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Playout.cpp
g++     -std=c++03 -m64 -c -o Zobrist.o -DSPEC -DNDEBUG -I.  -fprofile-generate
 -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Zobrist.cpp
g++     -std=c++03 -m64 -c -o KoState.o -DSPEC -DNDEBUG -I.  -fprofile-generate
 -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
KoState.cpp
g++     -std=c++03 -m64 -c -o Matcher.o -DSPEC -DNDEBUG -I.  -fprofile-generate
 -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Matcher.cpp
g++     -std=c++03 -m64 -c -o TTable.o -DSPEC -DNDEBUG -I.  -fprofile-generate 
-g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
TTable.cpp
g++     -std=c++03 -m64 -c -o Random.o -DSPEC -DNDEBUG -I.  -fprofile-generate 
-g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Random.cpp
g++     -std=c++03 -m64 -c -o SMP.o -DSPEC -DNDEBUG -I.  -fprofile-generate  -g
-Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64  SMP.cpp
g++     -std=c++03 -m64 -c -o MCOTable.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  MCOTable.cpp
g++     -std=c++03 -m64 -c -o UCTSearch.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  UCTSearch.cpp
g++     -std=c++03 -m64 -c -o SGFParser.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  SGFParser.cpp
g++     -std=c++03 -m64 -c -o Leela.o -DSPEC -DNDEBUG -I.  -fprofile-generate 
-g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
Leela.cpp
g++     -std=c++03 -m64 -c -o GameState.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  GameState.cpp
g++     -std=c++03 -m64 -c -o FastState.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  FastState.cpp
g++     -std=c++03 -m64 -c -o UCTNode.o -DSPEC -DNDEBUG -I.  -fprofile-generate
 -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
UCTNode.cpp
g++     -std=c++03 -m64 -c -o SGFTree.o -DSPEC -DNDEBUG -I.  -fprofile-generate
 -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64 
SGFTree.cpp
g++     -std=c++03 -m64 -c -o GTP.o -DSPEC -DNDEBUG -I.  -fprofile-generate  -g
-Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP  -DSPEC_LP64  GTP.cpp
g++     -std=c++03 -m64 -c -o FastBoard.o -DSPEC -DNDEBUG -I. 
-fprofile-generate  -g -Ofast -march=native -flto       -fopenmp -DSPEC_OPENMP 
-DSPEC_LP64  FastBoard.cpp
g++     -std=c++03 -m64     -fprofile-generate  -g -Ofast -march=native -flto  
     -fopenmp -DSPEC_OPENMP  FullBoard.o KoState.o Playout.o TimeControl.o
UCTSearch.o GameState.o Leela.o SGFParser.o Timing.o Utils.o FastBoard.o
Matcher.o SGFTree.o TTable.o Zobrist.o FastState.o GTP.o MCOTable.o Random.o
SMP.o UCTNode.o                      -o leela_s

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (5 preceding siblings ...)
  2024-02-02  4:11 ` lehua.ding at rivai dot ai
@ 2024-02-02  4:33 ` pinskia at gcc dot gnu.org
  2024-02-02  4:41 ` pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  4:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Works for me with r14-8399-ge6fbc3cc786a74.

My -march=native expands to: `-march=skylake-avx512 -mmmx -mpopcnt -msse -msse2
-msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mno-sse4a -mno-fma4 -mno-xop
-mfma -mavx512f -mbmi -mbmi2 -maes -mpclmul -mavx512vl -mavx512bw -mavx512dq
-mavx512cd -mno-avx512vbmi -mno-avx512ifma -mno-avx512vpopcntdq
-mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg
-mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -madx -mabm -mno-cldemote
-mclflushopt -mclwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr
-mhle -msahf -mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mno-mwaitx
-mno-pconfig -mpku -mprfchw -mno-ptwrite -mno-rdpid -mrdrnd -mrdseed -mrtm
-mno-serialize -mno-sgx -mno-sha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes
-mno-waitpkg -mno-wbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile
-mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl
-mno-avxvnni -mno-avx512fp16 -mno-avxifma -mno-avxvnniint8 -mno-avxneconvert
-mno-cmpccxadd -mno-amx-fp16 -mno-prefetchi -mno-raoint -mno-amx-complex
-mno-avxvnniint16 -mno-sm3 -mno-sha512 -mno-sm4 -mno-apxf -mno-usermsr --param
l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=16896
-mtune=skylake-avx512` .

Can you provide what yours expands to?

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (6 preceding siblings ...)
  2024-02-02  4:33 ` pinskia at gcc dot gnu.org
@ 2024-02-02  4:41 ` pinskia at gcc dot gnu.org
  2024-02-02  4:44 ` pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  4:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I just tried with a cross to aarch64-linux-gnu and that does not reproduce the
error either.

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (7 preceding siblings ...)
  2024-02-02  4:41 ` pinskia at gcc dot gnu.org
@ 2024-02-02  4:44 ` pinskia at gcc dot gnu.org
  2024-02-02  4:49 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  4:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Maybe related to
https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586290.html .

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (8 preceding siblings ...)
  2024-02-02  4:44 ` pinskia at gcc dot gnu.org
@ 2024-02-02  4:49 ` pinskia at gcc dot gnu.org
  2024-02-02  5:03 ` lehua.ding at rivai dot ai
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  4:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|WAITING                     |UNCONFIRMED

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Finally able to reproduce it using -fno-use-linker-plugin .

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (9 preceding siblings ...)
  2024-02-02  4:49 ` pinskia at gcc dot gnu.org
@ 2024-02-02  5:03 ` lehua.ding at rivai dot ai
  2024-02-02  5:07 ` lehua.ding at rivai dot ai
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  5:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Lehua Ding <lehua.ding at rivai dot ai> ---
(In reply to Andrew Pinski from comment #10)
> Finally able to reproduce it using -fno-use-linker-plugin .

I compile GCC with this commit e0701f8f7b6dcddb299eb5345e510cf9ea419150, but
the as and ld are host's.

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (10 preceding siblings ...)
  2024-02-02  5:03 ` lehua.ding at rivai dot ai
@ 2024-02-02  5:07 ` lehua.ding at rivai dot ai
  2024-02-02  5:21 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lehua.ding at rivai dot ai @ 2024-02-02  5:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Lehua Ding <lehua.ding at rivai dot ai> ---
(In reply to Andrew Pinski from comment #7)
> Works for me with r14-8399-ge6fbc3cc786a74.
> 
> My -march=native expands to: `-march=skylake-avx512 -mmmx -mpopcnt -msse
> -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mno-sse4a -mno-fma4
> -mno-xop -mfma -mavx512f -mbmi -mbmi2 -maes -mpclmul -mavx512vl -mavx512bw
> -mavx512dq -mavx512cd -mno-avx512vbmi -mno-avx512ifma -mno-avx512vpopcntdq
> -mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg
> -mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -madx -mabm -mno-cldemote
> -mclflushopt -mclwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr
> -mhle -msahf -mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri
> -mno-mwaitx -mno-pconfig -mpku -mprfchw -mno-ptwrite -mno-rdpid -mrdrnd
> -mrdseed -mrtm -mno-serialize -mno-sgx -mno-sha -mno-shstk -mno-tbm
> -mno-tsxldtrk -mno-vaes -mno-waitpkg -mno-wbnoinvd -mxsave -mxsavec
> -mxsaveopt -mxsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr
> -mno-hreset -mno-kl -mno-widekl -mno-avxvnni -mno-avx512fp16 -mno-avxifma
> -mno-avxvnniint8 -mno-avxneconvert -mno-cmpccxadd -mno-amx-fp16
> -mno-prefetchi -mno-raoint -mno-amx-complex -mno-avxvnniint16 -mno-sm3
> -mno-sha512 -mno-sm4 -mno-apxf -mno-usermsr --param l1-cache-size=32 --param
> l1-cache-line-size=64 --param l2-cache-size=16896 -mtune=skylake-avx512` .
> 
> Can you provide what yours expands to?

like this:

`-march=cascadelake -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1
-msse4.2 -mavx -mavx2 -mno-sse4a -mno-fma4 -mno-xop -mfma -mavx512f -mbmi
-mbmi2 -maes -mpclmul -mavx512vl -mavx512bw -mavx512dq -mavx512cd
-mno-avx512vbmi -mno-avx512ifma -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni
-mno-vpclmulqdq -mavx512vnni -mno-avx512bitalg -mno-avx512bf16
-mno-avx512vp2intersect -mno-3dnow -madx -mabm -mno-cldemote -mclflushopt
-mclwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mhle -msahf
-mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mno-mwaitx -mno-pconfig
-mpku -mprfchw -mno-ptwrite -mno-rdpid -mrdrnd -mrdseed -mrtm -mno-serialize
-mno-sgx -mno-sha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes -mno-waitpkg
-mno-wbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile -mno-amx-int8
-mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni
-mno-avx512fp16 -mno-avxifma -mno-avxvnniint8 -mno-avxneconvert -mno-cmpccxadd
-mno-amx-fp16 -mno-prefetchi -mno-raoint -mno-amx-complex -mno-avxvnniint16
-mno-sm3 -mno-sha512 -mno-sm4 -mno-apxf -mno-usermsr --param l1-cache-size=32
--param l1-cache-line-size=64 --param l2-cache-size=36608 -mtune=cascadelake`

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (11 preceding siblings ...)
  2024-02-02  5:07 ` lehua.ding at rivai dot ai
@ 2024-02-02  5:21 ` pinskia at gcc dot gnu.org
  2024-02-02 16:58 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02  5:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Only need SGFTree.cpp, GTP.cpp to reproduce the issue.

Reducing it further.

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (12 preceding siblings ...)
  2024-02-02  5:21 ` pinskia at gcc dot gnu.org
@ 2024-02-02 16:58 ` pinskia at gcc dot gnu.org
  2024-02-02 19:09 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 16:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I should have a fully reduced testcase by the end of the day. I have it done to
one file with the added option of `-flto-partition=max` .

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

* [Bug lto/113712] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (13 preceding siblings ...)
  2024-02-02 16:58 ` pinskia at gcc dot gnu.org
@ 2024-02-02 19:09 ` pinskia at gcc dot gnu.org
  2024-02-02 19:10 ` [Bug lto/113712] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 19:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 57297
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57297&action=edit
testcase

Compile with `-r -fprofile-generate  -O3 -flto -fno-use-linker-plugin 
-flto-partition=max`

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

* [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (14 preceding siblings ...)
  2024-02-02 19:09 ` pinskia at gcc dot gnu.org
@ 2024-02-02 19:10 ` pinskia at gcc dot gnu.org
  2024-02-05  8:25 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code,
                   |                            |needs-bisection
      Known to fail|                            |10.1.0, 12.1.0
      Known to work|                            |8.1.0, 9.1.0
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |11.5
     Ever confirmed|0                           |1
            Summary|lto crash: when building    |[11/12/13/14 Regression]
                   |641.leela_s peek with       |lto crash: when building
                   |Example-gcc-linux-x86.cfg   |641.leela_s peek with
                   |(SPEC2017 1.1.9)            |Example-gcc-linux-x86.cfg
                   |                            |(SPEC2017 1.1.9)

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (15 preceding siblings ...)
  2024-02-02 19:10 ` [Bug lto/113712] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
@ 2024-02-05  8:25 ` rguenth at gcc dot gnu.org
  2024-02-11 14:44 ` pheeck at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-05  8:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |26163
           Priority|P3                          |P2


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

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

* [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9)
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (16 preceding siblings ...)
  2024-02-05  8:25 ` rguenth at gcc dot gnu.org
@ 2024-02-11 14:44 ` pheeck at gcc dot gnu.org
  2024-02-12 17:15 ` [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) since r10-3311-gff6686d2e5f797 jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pheeck at gcc dot gnu.org @ 2024-02-11 14:44 UTC (permalink / raw)
  To: gcc-bugs

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

Filip Kastl <pheeck at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |mjambor at suse dot cz,
                   |                            |pheeck at gcc dot gnu.org

--- Comment #17 from Filip Kastl <pheeck at gcc dot gnu.org> ---
I've bisected this (using the test from Andrew Pinski) to
r10-3311-gff6686d2e5f797

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

* [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) since r10-3311-gff6686d2e5f797
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (17 preceding siblings ...)
  2024-02-11 14:44 ` pheeck at gcc dot gnu.org
@ 2024-02-12 17:15 ` jamborm at gcc dot gnu.org
  2024-02-12 17:25 ` pinskia at gcc dot gnu.org
  2024-02-12 18:00 ` jamborm at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-02-12 17:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Filip Kastl from comment #17)
> I've bisected this (using the test from Andrew Pinski) to
> r10-3311-gff6686d2e5f797

That's a coincidence, with -fno-ipa-sra the testcase fails even earlier,
IPA-SRA was just hiding it, most probably by localizing some symbol before the
linking stage.

Bugs that are only reproducible with -fno-use-linker-plugin are unlikely to get
a high priority.  But I understand that the original issue does not need it?

(Also, the issue is supposed to be reproducible ton x86_64-linux, right?)

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

* [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) since r10-3311-gff6686d2e5f797
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (18 preceding siblings ...)
  2024-02-12 17:15 ` [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) since r10-3311-gff6686d2e5f797 jamborm at gcc dot gnu.org
@ 2024-02-12 17:25 ` pinskia at gcc dot gnu.org
  2024-02-12 18:00 ` jamborm at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-12 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #18)
> (In reply to Filip Kastl from comment #17)
> > I've bisected this (using the test from Andrew Pinski) to
> > r10-3311-gff6686d2e5f797
> 
> That's a coincidence, with -fno-ipa-sra the testcase fails even earlier,
> IPA-SRA was just hiding it, most probably by localizing some symbol before
> the linking stage.
> 
> Bugs that are only reproducible with -fno-use-linker-plugin are unlikely to
> get a high priority.  But I understand that the original issue does not need
> it?

I am not 100% sure if the original reported issue had been using the LTO plugin
because I could not reproduce it when using the plugin. 

> 
> (Also, the issue is supposed to be reproducible ton x86_64-linux, right?)

Yes it is supposed to be reproducible on x86_64; I reduced it there.

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

* [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) since r10-3311-gff6686d2e5f797
  2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
                   ` (19 preceding siblings ...)
  2024-02-12 17:25 ` pinskia at gcc dot gnu.org
@ 2024-02-12 18:00 ` jamborm at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-02-12 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I have access to the benchmark and building it with -fprofile-generate
it fails for me (with an ICE in add_symbol_to_partition_1) only when I
use -fno-use-linker-plugin and either -std=c++11 or -std=c++03. Using
-std=c++14 also avoids the issue.  In any event, -fno-use-linker-plugin
looks necessary.

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

end of thread, other threads:[~2024-02-12 18:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02  1:57 [Bug lto/113712] New: lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) lehua.ding at rivai dot ai
2024-02-02  2:18 ` [Bug lto/113712] " lehua.ding at rivai dot ai
2024-02-02  2:32 ` pinskia at gcc dot gnu.org
2024-02-02  3:22 ` lehua.ding at rivai dot ai
2024-02-02  3:34 ` pinskia at gcc dot gnu.org
2024-02-02  4:09 ` lehua.ding at rivai dot ai
2024-02-02  4:11 ` lehua.ding at rivai dot ai
2024-02-02  4:33 ` pinskia at gcc dot gnu.org
2024-02-02  4:41 ` pinskia at gcc dot gnu.org
2024-02-02  4:44 ` pinskia at gcc dot gnu.org
2024-02-02  4:49 ` pinskia at gcc dot gnu.org
2024-02-02  5:03 ` lehua.ding at rivai dot ai
2024-02-02  5:07 ` lehua.ding at rivai dot ai
2024-02-02  5:21 ` pinskia at gcc dot gnu.org
2024-02-02 16:58 ` pinskia at gcc dot gnu.org
2024-02-02 19:09 ` pinskia at gcc dot gnu.org
2024-02-02 19:10 ` [Bug lto/113712] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-02-05  8:25 ` rguenth at gcc dot gnu.org
2024-02-11 14:44 ` pheeck at gcc dot gnu.org
2024-02-12 17:15 ` [Bug lto/113712] [11/12/13/14 Regression] lto crash: when building 641.leela_s peek with Example-gcc-linux-x86.cfg (SPEC2017 1.1.9) since r10-3311-gff6686d2e5f797 jamborm at gcc dot gnu.org
2024-02-12 17:25 ` pinskia at gcc dot gnu.org
2024-02-12 18:00 ` jamborm 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).