https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113739
Bug ID: 113739 Summary: ICE: in riscv_hard_regno_nregs, at config/riscv/riscv.cc:8072 with __attribute__((__target__("arch=rv64gcv"))) 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 57306 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57306&action=edit reduced testcase (from gcc.target/riscv/target-attr-01.c) Compiler output: $ riscv64-unknown-linux-gnu-gcc testcase.c testcase.c: In function 'foo': testcase.c:4:1: internal compiler error: in riscv_hard_regno_nregs, at config/riscv/riscv.cc:8072 4 | { | ^ 0xb8742e riscv_hard_regno_nregs /repo/gcc-trunk/gcc/config/riscv/riscv.cc:8072 0x166c5fa init_reg_modes_target() /repo/gcc-trunk/gcc/reginfo.cc:471 0x128b5f3 init_emit_regs() /repo/gcc-trunk/gcc/emit-rtl.cc:6237 0x171df76 target_reinit() /repo/gcc-trunk/gcc/toplev.cc:1934 0x2b9c43a save_target_globals() /repo/gcc-trunk/gcc/target-globals.cc:92 0x1aeb99d riscv_save_restore_target_globals(tree_node*) /repo/gcc-trunk/gcc/config/riscv/riscv.cc:9081 0x1aeb99d riscv_save_restore_target_globals(tree_node*) /repo/gcc-trunk/gcc/config/riscv/riscv.cc:9074 0x133c4f4 invoke_set_current_function_hook /repo/gcc-trunk/gcc/function.cc:4689 0x1345917 invoke_set_current_function_hook /repo/gcc-trunk/gcc/function.cc:4863 0x1345917 allocate_struct_function(tree_node*, bool) /repo/gcc-trunk/gcc/function.cc:4812 0x100f6ed store_parm_decls() /repo/gcc-trunk/gcc/c/c-decl.cc:11084 0x10780f2 c_parser_declaration_or_fndef /repo/gcc-trunk/gcc/c/c-parser.cc:2975 0x1081f2b c_parser_external_declaration /repo/gcc-trunk/gcc/c/c-parser.cc:2046 0x1082913 c_parser_translation_unit /repo/gcc-trunk/gcc/c/c-parser.cc:1900 0x1082913 c_parse_file() /repo/gcc-trunk/gcc/c/c-parser.cc:26815 0x10f83b1 c_common_parse_file() /repo/gcc-trunk/gcc/c-family/c-opts.cc:1306 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-8771-20240203001826-g4b7d4d8a4af-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-8771-20240203001826-g4b7d4d8a4af-checking-yes-rtl-df-extra-riscv64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240203 (experimental) (GCC)