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

            Bug ID: 117711
           Summary: [15 Regression] ICE: in plus_constant, at
                    explow.cc:102 with -mabi=ilp32 and string builtin
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: 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: aarch64-unknown-linux-gnu

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

Compiler output:
$ aarch64-unknown-linux-gnu-gcc -mabi=ilp32 testcase.c
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:6:5: internal compiler error: in plus_constant, at explow.cc:102
    6 |     __builtin_strcpy(p, 0x200000 + x);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x2743d2e internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:518
0xc6f213 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1697
0x7f6772 plus_constant(machine_mode, rtx_def*, poly_int<2u, long>, bool)
        /repo/gcc-trunk/gcc/explow.cc:102
0x181b432 aarch64_load_symref_appropriately
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:3044
0x181b432 aarch64_expand_mov_immediate(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:6240
0x181b2b5 aarch64_expand_mov_immediate(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:6204
0x1fa5885 gen_movsi(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.md:1550
0xf6e9b0 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /repo/gcc-trunk/gcc/recog.h:469
0xf6e9b0 emit_move_ccmode
        /repo/gcc-trunk/gcc/expr.cc:4452
0xf6e9b0 emit_move_insn_1(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4597
0xf6edbd emit_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4748
0xf434d0 copy_to_mode_reg(machine_mode, rtx_def*)
        /repo/gcc-trunk/gcc/explow.cc:659
0x1249052 maybe_legitimize_operand
        /repo/gcc-trunk/gcc/optabs.cc:8020
0x1249052 maybe_legitimize_operands(insn_code, unsigned int, unsigned int,
expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8163
0x12452e9 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8182
0x124559c maybe_emit_unop_insn(insn_code, rtx_def*, rtx_def*, rtx_code)
        /repo/gcc-trunk/gcc/optabs.cc:4094
0x1245668 emit_unop_insn(insn_code, rtx_def*, rtx_def*, rtx_code)
        /repo/gcc-trunk/gcc/optabs.cc:4118
0xe27ab9 expand_gimple_stmt_1
        /repo/gcc-trunk/gcc/cfgexpand.cc:4071
0xe27ab9 expand_gimple_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:4116
0xe2dd8e expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.cc:6172
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.

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r15-5510-20241120132742c3d20bfb-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/15.0.0/lto-wrapper
Target: aarch64-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
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r15-5510-20241120132742c3d20bfb-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20241120 (experimental) (GCC)

Reply via email to