Thanks for reporting this. Just take a look from my test log that 930623-1.c is all pass.
Thus I bet this difference comes from the build option --with-arch=rv32imac but my test script take rv64gcv. > I've built the git revision f3fdcf4a37a with > ../gcc-trunk/configure --target=riscv-unknown-elf > --prefix=/home/ed/gnu/riscv-unknown-elf --enable-languages=c,c++ > --disable-multilib --with-arch=rv32imac --with-abi=ilp32 > I am a bit surprised since the target is not supposed to support floating > point > or vector instructions AFAIK. Because you specify rv32imac, with doesn't include f/d/v extension, aka single/double floating point and vector extension. Thus, related functionality are disabled. > The issue does not happen with gcc-trunk from yesterday. Ack, will look into it. Pan -----Original Message----- From: Bernd Edlinger <bernd.edlin...@hotmail.de> Sent: Thursday, April 11, 2024 7:52 PM To: Li, Pan2 <pan2...@intel.com>; Kito Cheng <kito.ch...@gmail.com>; juzhe.zh...@rivai.ai Cc: gcc-patches <gcc-patches@gcc.gnu.org> Subject: Re: [PATCH v1] RISC-V: Bugfix ICE for the vector return arg in mode switch On 4/11/24 05:03, Li, Pan2 wrote: > Committed, thanks Juzhe and Kito. > > Pan Hi Pan, this commit caused a regression: FAIL: gcc.c-torture/compile/930623-1.c -O0 (test for excess errors) FAIL: gcc.c-torture/compile/930623-1.c -O1 (internal compiler error: in emit_vec_extract, at config/riscv/riscv-v.cc:5059) FAIL: gcc.c-torture/compile/930623-1.c -O1 (test for excess errors) FAIL: gcc.c-torture/compile/930623-1.c -O2 (internal compiler error: in emit_vec_extract, at config/riscv/riscv-v.cc:5059) FAIL: gcc.c-torture/compile/930623-1.c -O2 (test for excess errors) FAIL: gcc.c-torture/compile/930623-1.c -O3 -g (internal compiler error: in emit_vec_extract, at config/riscv/riscv-v.cc:5059) FAIL: gcc.c-torture/compile/930623-1.c -O3 -g (test for excess errors) FAIL: gcc.c-torture/compile/930623-1.c -Os (internal compiler error: in emit_vec_extract, at config/riscv/riscv-v.cc:5059) FAIL: gcc.c-torture/compile/930623-1.c -Os (test for excess errors) FAIL: gcc.c-torture/compile/930623-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error: in emit_vec_extract, at config/riscv/riscv-v.cc:5059) FAIL: gcc.c-torture/compile/930623-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) gcc/testsuite/gcc.c-torture/compile/930623-1.c:10:3: internal compiler error: in emit_vec_extract, at config/riscv/riscv-v.cc:5059^M 0xbba2de riscv_vector::emit_vec_extract(rtx_def*, rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/config/riscv/riscv-v.cc:5059^M 0x186945f riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/config/riscv/riscv.cc:2895^M 0x1ef50b2 gen_movsi(rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/config/riscv/riscv.md:2225^M 0xffc91c rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const^M ../../gcc-trunk/gcc/recog.h:441^M 0xffc91c emit_move_insn_1(rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/expr.cc:4551^M 0xffcdf4 emit_move_insn(rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/expr.cc:4721^M 0x1002f17 emit_move_multi_word^M ../../gcc-trunk/gcc/expr.cc:4517^M 0xffcdf4 emit_move_insn(rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/expr.cc:4721^M 0x1efc6b7 gen_untyped_call(rtx_def*, rtx_def*, rtx_def*)^M ../../gcc-trunk/gcc/config/riscv/riscv.md:3478^M 0x185fc7c target_gen_untyped_call^M ../../gcc-trunk/gcc/config/riscv/riscv.md:3453^M 0xe8e81f expand_builtin_apply^M ../../gcc-trunk/gcc/builtins.cc:1761^M 0xea053c expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)^M ../../gcc-trunk/gcc/builtins.cc:8001^M 0xff9e27 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)^M ../../gcc-trunk/gcc/expr.cc:12353^M 0xec4c3d expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)^M ../../gcc-trunk/gcc/expr.h:316^M 0xec4c3d expand_call_stmt^M ../../gcc-trunk/gcc/cfgexpand.cc:2865^M 0xec4c3d expand_gimple_stmt_1^M ../../gcc-trunk/gcc/cfgexpand.cc:3932^M 0xec4c3d expand_gimple_stmt^M ../../gcc-trunk/gcc/cfgexpand.cc:4077^M 0xeca206 expand_gimple_basic_block^M ../../gcc-trunk/gcc/cfgexpand.cc:6133^M 0xecc287 execute^M ../../gcc-trunk/gcc/cfgexpand.cc:6872^M Please submit a full bug report, with preprocessed source (by using -freport-bug).^M Please include the complete backtrace with any bug report.^M See <https://gcc.gnu.org/bugs/> for instructions.^M compiler exited with status 1 I've built the git revision f3fdcf4a37a with ../gcc-trunk/configure --target=riscv-unknown-elf --prefix=/home/ed/gnu/riscv-unknown-elf --enable-languages=c,c++ --disable-multilib --with-arch=rv32imac --with-abi=ilp32 I am a bit surprised since the target is not supposed to support floating point or vector instructions AFAIK. The issue does not happen with gcc-trunk from yesterday. Regards Bernd.