public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111565] New: ICE: in riscv_expand_strcmp_scalar, at config/riscv/riscv-string.cc:382 with -mcpu=thead-c906 -minline-strncmp
@ 2023-09-24  7:30 zsojka at seznam dot cz
  0 siblings, 0 replies; only message in thread
From: zsojka at seznam dot cz @ 2023-09-24  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111565
           Summary: ICE: in riscv_expand_strcmp_scalar, at
                    config/riscv/riscv-string.cc:382 with -mcpu=thead-c906
                    -minline-strncmp
           Product: gcc
           Version: 14.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: riscv64-unknown-linux-gnu

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

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -mcpu=thead-c906 -minline-strncmp testcase.c 
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:4:10: internal compiler error: in riscv_expand_strcmp_scalar, at
config/riscv/riscv-string.cc:382
    4 |   return __builtin_strncmp (p, q, 0x800000000000000);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xedd797 riscv_expand_strcmp_scalar
        /repo/gcc-trunk/gcc/config/riscv/riscv-string.cc:382
0xedd797 riscv_expand_strcmp(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv-string.cc:513
0x20dd6af gen_cmpstrnsi(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv.md:3528
0x14948a8 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /repo/gcc-trunk/gcc/optabs.cc:8276
0x11d9ad1 expand_cmpstrn_or_cmpmem(insn_code, rtx_def*, rtx_def*, rtx_def*,
tree_node*, rtx_def*, long)
        /repo/gcc-trunk/gcc/expr.cc:2377
0x107f6f1 expand_builtin_strncmp
        /repo/gcc-trunk/gcc/builtins.cc:4956
0x10837e9 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        /repo/gcc-trunk/gcc/builtins.cc:7789
0x11e8c05 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:11912
0x11e152a expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:9010
0x11e152a expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
        /repo/gcc-trunk/gcc/expr.h:310
0x11e152a expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /repo/gcc-trunk/gcc/expr.cc:9345
0x11e5982 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:12200
0x11f5fa3 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.cc:9010
0x11f5fa3 expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
        /repo/gcc-trunk/gcc/expr.h:310
0x11f5fa3 store_expr(tree_node*, rtx_def*, int, bool, bool)
        /repo/gcc-trunk/gcc/expr.cc:6208
0x11f6ed5 expand_assignment(tree_node*, tree_node*, bool)
        /repo/gcc-trunk/gcc/expr.cc:6043
0x10aa62a expand_call_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:2829
0x10aa62a expand_gimple_stmt_1
        /repo/gcc-trunk/gcc/cfgexpand.cc:3880
0x10aa62a expand_gimple_stmt
        /repo/gcc-trunk/gcc/cfgexpand.cc:4044
0x10af936 expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.cc:6100
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.

$ riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-4240-20230924001658-g08b887fd41c-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: riscv64-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-isa-spec=2.2
--with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-4240-20230924001658-g08b887fd41c-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230924 (experimental) (GCC)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-24  7:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-24  7:30 [Bug target/111565] New: ICE: in riscv_expand_strcmp_scalar, at config/riscv/riscv-string.cc:382 with -mcpu=thead-c906 -minline-strncmp zsojka at seznam dot cz

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).