Should be fixed by the below PATCH, feel free to ping me if any issues. https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634616.html
Pan -----Original Message----- From: Andreas Schwab <sch...@linux-m68k.org> Sent: Saturday, October 28, 2023 4:16 PM To: 钟居哲 <juzhe.zh...@rivai.ai> Cc: patrick <patr...@rivosinc.com>; gcc-patches <gcc-patches@gcc.gnu.org>; kito.cheng <kito.ch...@gmail.com>; rdapp.gcc <rdapp....@gmail.com> Subject: Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization ../../gcc/config/riscv/riscv-avlprop.cc: In member function 'virtual unsigned int pass_avlprop::execute(function*)': ../../gcc/config/riscv/riscv-avlprop.cc:346:23: error: loop variable 'candidate' creates a copy from type 'const std::pair<avlprop_type, rtl_ssa::insn_info*>' [-Werror=range-loop-construct] 346 | for (const auto candidate : m_candidates) | ^~~~~~~~~ ../../gcc/config/riscv/riscv-avlprop.cc:346:23: note: use reference type to prevent copying 346 | for (const auto candidate : m_candidates) | ^~~~~~~~~ | & -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."