https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113416
Bug ID: 113416
Summary: ICE: in force_constant_size, at gimplify.cc:742 (in
convert_move, at expr.cc:223) with -march=rv64gcv
(-march=rv32gcv) and -ftree-parallelize-loops=2
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 57098
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57098&action=edit
reduced testcase
This has been reduced from gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-27.c ;
it fails the same way with -ftree-parallelize-loops=2.
Compiler output:
$ riscv64-unknown-linux-gnu-gcc -O -march=rv64gcv -ftree-parallelize-loops=2
testcase.c
during GIMPLE pass: parloops
testcase.c: In function 'f':
testcase.c:4:1: internal compiler error: in force_constant_size, at
gimplify.cc:743
4 | f(long out, int n)
| ^
0xa18136 force_constant_size
/repo/gcc-trunk/gcc/gimplify.cc:743
0x134e297 gimple_add_tmp_var(tree_node*)
/repo/gcc-trunk/gcc/gimplify.cc:781
0x1304676 create_tmp_var(tree_node*, char const*)
/repo/gcc-trunk/gcc/gimple-expr.cc:491
0x1780c4d separate_decls_in_region
/repo/gcc-trunk/gcc/tree-parloops.cc:2125
0x1782dd1 gen_parallel_loop
/repo/gcc-trunk/gcc/tree-parloops.cc:3162
0x1784a48 parallelize_loops
/repo/gcc-trunk/gcc/tree-parloops.cc:4140
0x1785dc1 execute
/repo/gcc-trunk/gcc/tree-parloops.cc:4228
0x1785dc1 execute
/repo/gcc-trunk/gcc/tree-parloops.cc:4207
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 -O -march=rv32gcv -mabi=ilp32
-ftree-parallelize-loops=2 testcase.c
during RTL pass: expand
testcase.c: In function 'f._loopfn.0':
testcase.c:6:17: internal compiler error: in convert_move, at expr.cc:223
6 | for (int i; i < n; i++) {
| ^
0x9f3dd1 convert_move(rtx_def*, rtx_def*, int)
/repo/gcc-trunk/gcc/expr.cc:223
0x127807a store_expr(tree_node*, rtx_def*, int, bool, bool)
/repo/gcc-trunk/gcc/expr.cc:6810
0x1279909 expand_assignment(tree_node*, tree_node*, bool)
/repo/gcc-trunk/gcc/expr.cc:6443
0x112715c expand_gimple_stmt_1
/repo/gcc-trunk/gcc/cfgexpand.cc:3966
0x112715c expand_gimple_stmt
/repo/gcc-trunk/gcc/cfgexpand.cc:4064
0x112e2be expand_gimple_basic_block
/repo/gcc-trunk/gcc/cfgexpand.cc:6120
0x112fec7 execute
/repo/gcc-trunk/gcc/cfgexpand.cc:6855
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-7258-20240115151353-g731444b3c39-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.0.1/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-7258-20240115151353-g731444b3c39-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240115 (experimental) (GCC)