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

            Bug ID: 118663
           Summary: [15 Regression] ICE: in rs6000_emit_move, at
                    config/rs6000/rs6000.cc:11091 during libgcc build
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: build, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: powerpc-unknown-linux-gnu

Created attachment 60282
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60282&action=edit
auto-reduced testcase

Even with PR118560 fixed, I am failing to build the powerpc-unknown-linux-gnu
cross-compiler; it ICEs during libgcc build:

/repo/build-gcc-trunk-powerpc/./gcc/xgcc -B/repo/build-gcc-trunk-powerpc/./gcc/
-B/repo/gcc-trunk//binary-trunk-20250126131720-r15-7215-g55d288d4ff5360-checking-yes-rtl-df-extra-powerpc/powerpc-unknown-linux-gnu/bin/
-B/repo/gcc-trunk//binary-trunk-20250126131720-r15-7215-g55d288d4ff5360-checking-yes-rtl-df-extra-powerpc/powerpc-unknown-linux-gnu/lib/
-isystem
/repo/gcc-trunk//binary-trunk-20250126131720-r15-7215-g55d288d4ff5360-checking-yes-rtl-df-extra-powerpc/powerpc-unknown-linux-gnu/include
-isystem
/repo/gcc-trunk//binary-trunk-20250126131720-r15-7215-g55d288d4ff5360-checking-yes-rtl-df-extra-powerpc/powerpc-unknown-linux-gnu/sys-include
   -g -O2 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall
-Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC
-mlong-double-128 -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector  -fPIC -mlong-double-128 -mno-minimal-toc -I. -I.
-I../.././gcc -I/repo/gcc-trunk/libgcc -I/repo/gcc-trunk/libgcc/.
-I/repo/gcc-trunk/libgcc/../gcc -I/repo/gcc-trunk/libgcc/../include
-I/repo/gcc-trunk/libgcc/../libdecnumber/dpd
-I/repo/gcc-trunk/libgcc/../libdecnumber -DHAVE_CC_TLS   -o _sd_to_si.o -MT
_sd_to_si.o -MD -MP -MF _sd_to_si.dep -DFINE_GRAINED_LIBRARIES -DL_sd_to_si
-DWIDTH=32 -c /repo/gcc-trunk/libgcc/dfp-bit.c
during RTL pass: reload
/repo/gcc-trunk/libgcc/dfp-bit.c: In function '__dpd_fixsdsi':
/repo/gcc-trunk/libgcc/dfp-bit.c:502:1: internal compiler error: in
rs6000_emit_move, at config/rs6000/rs6000.cc:11091
  502 | }
      | ^
0x213d021 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0xa0519f fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1722
0x8494f8 rs6000_emit_move(rtx_def*, rtx_def*, machine_mode)
        /repo/gcc-trunk/gcc/config/rs6000/rs6000.cc:11091
0x1cd7990 gen_movsd(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/rs6000/rs6000.md:8209
0xd121a7 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /repo/gcc-trunk/gcc/recog.h:472
0xd121a7 emit_move_ccmode
        /repo/gcc-trunk/gcc/expr.cc:4455
0xd121a7 emit_move_insn_1(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4600
0xd1a67b gen_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4771
0xf73537 curr_insn_transform
        /repo/gcc-trunk/gcc/lra-constraints.cc:4435
0xf74e43 lra_constraints(bool)
        /repo/gcc-trunk/gcc/lra-constraints.cc:5549
0xf5ce04 lra(_IO_FILE*, int)
        /repo/gcc-trunk/gcc/lra.cc:2449
0xf0744f do_reload
        /repo/gcc-trunk/gcc/ira.cc:5987
0xf0744f execute
        /repo/gcc-trunk/gcc/ira.cc:6175
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


$ /repo/build-gcc-trunk-powerpc/gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/repo/build-gcc-trunk-powerpc/gcc/xgcc
Target: powerpc-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --enable-libsanitizer
--with-sysroot=/usr/powerpc-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=powerpc-unknown-linux-gnu
--with-ld=/usr/bin/powerpc-unknown-linux-gnu-ld
--with-as=/usr/bin/powerpc-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20250126131720-r15-7215-g55d288d4ff5360-checking-yes-rtl-df-extra-powerpc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.1 20250126 (experimental) (GCC) 


And for the reduced testcase:
$ /repo/build-gcc-trunk-powerpc/gcc/cc1 _sd_to_si.i -O2
_sd_to_si.i:3:1: warning: no semicolon at end of struct or union
    3 | } __dpd_fixsdsi_u32;
      | ^
 __dpd_fixsdsi
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> {heap 1004k} <visibility> {heap 1004k} <build_ssa_passes>
{heap 1004k} <opt_local_passes> {heap 1280k} <remove_symbols> {heap 1740k}
<targetclone> {heap 1740k} <free-fnsummary> {heap 1740k} <increase_alignment>
{heap 1740k}Streaming LTO
 <whole-program> {heap 1740k} <profile_estimate> {heap 1740k} <icf> {heap
1740k} <devirt> {heap 1740k} <cp> {heap 1740k} <sra> {heap 1740k} <fnsummary>
{heap 1740k} <inline> {heap 1740k} <pure-const> {heap 1740k} <modref> {heap
1740k} <free-fnsummary> {heap 1740k} <static-var> {heap 1740k} <single-use>
{heap 1740k} <comdats> {heap 1740k}Assembling functions:
 __dpd_fixsdsiduring RTL pass: reload
_sd_to_si.i: In function '__dpd_fixsdsi':
_sd_to_si.i:9:1: internal compiler error: in rs6000_emit_move, at
config/rs6000/rs6000.cc:11091
    9 | }
      | ^
0x213d021 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0xa0519f fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1722
0x8494f8 rs6000_emit_move(rtx_def*, rtx_def*, machine_mode)
        /repo/gcc-trunk/gcc/config/rs6000/rs6000.cc:11091
...

Reply via email to