[Bug tree-optimization/126635] New: [17 regression] Miscompiled go compiler in LTO build [r17-2845-ga7a444ddd1eb51]

schwab--- via Gcc-bugs <[email protected]> Tue, 04 Aug 2026 11:38:14 +0000
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D126635

            Bug ID: 126635
           Summary: [17 regression] Miscompiled go compiler in LTO build
                    [r17-2845-ga7a444ddd1eb51]
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: build, wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [email protected]
                CC: jakub at redhat dot com
  Target Milestone: ---
            Target: powerpc64le-*-*

r17-2845-ga7a444ddd1eb51 has broken the go compiler in an LTO bootstrap on
powerpc64le.

https://build.opensuse.org/package/live_build_log/devel:gcc:next/gcc17/open=
SUSE_Factory_PowerPC/ppc64le

libtool: compile:=20
/home/abuild/rpmbuild/BUILD/gcc17-17.0.1+git2889-build/gcc-17.0.1+git2889/o=
bj-powerpc64le-suse-linux/./gcc/gccgo
-B/home/abuild/rpmbuild/BUILD/gcc17-17.0.1+git2889-build/gcc-17.0.1+git2889=
/obj-powerpc64le-suse-linux/./gcc/
-B/usr/powerpc64le-suse-linux/bin/ -B/usr/powerpc64le-suse-linux/lib/ -isys=
tem
/usr/powerpc64le-suse-linux/include -isystem
/usr/powerpc64le-suse-linux/sys-include -O2 -g -I . -c -fgo-pkgpath=3Dimage=
/color
../../../libgo/go/image/color/color.go ../../../libgo/go/image/color/ycbcr.=
go=20
-fPIC -o image/.libs/color.o
during GIMPLE pass: store-merging
../../../libgo/go/image/color/ycbcr.go: In function =E2=80=98image/color.nY=
CbCrAModel=E2=80=99:
../../../libgo/go/image/color/ycbcr.go:294:1: internal compiler error:
Segmentation fault
  294 | func nYCbCrAModel(c Color) Color {
      | ^
0x127d5ed3 internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:787
0x10e9ef13 crash_signal
        ../../gcc/toplev.cc:325
0x10851574 gsi_insert_seq_after_without_update(gimple_stmt_iterator*, gimpl=
e*,
gsi_iterator_update)
        ../../gcc/gimple-iterator.cc:317
0x10851574 gsi_insert_seq_after(gimple_stmt_iterator*, gimple*,
gsi_iterator_update)
        ../../gcc/gimple-iterator.cc:342
0x123ec263 output_merged_store
        ../../gcc/gimple-ssa-store-merging.cc:4954
0x123ef46b output_merged_stores
        ../../gcc/gimple-ssa-store-merging.cc:4973
0x123ef46b terminate_and_process_chain
        ../../gcc/gimple-ssa-store-merging.cc:5020
0x123ef46b terminate_and_process_chain
        ../../gcc/gimple-ssa-store-merging.cc:2717
0x123f0757 terminate_and_process_all_chains
        ../../gcc/gimple-ssa-store-merging.cc:2650
0x123f0757 execute
        ../../gcc/gimple-ssa-store-merging.cc:5630

(This build also use PGO, but that is not needed for the bug to happen.)=