https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99022
Bug ID: 99022 Summary: When ‘long int’ is 32 bits,the conversion between 'vector(2) int' and 'vector(2) long int' can't be done without 'flax-vector-conversions'. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gengqi at linux dot alibaba.com Target Milestone: --- Created attachment 50150 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50150&action=edit riscv64-unknown-linux-gnu-gcc -march=rv32imac -mabi=ilp32 needflax.c -O2 -S riscv64-unknown-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/lhome/gengq/riscv64-linux-mastertest/bin/riscv64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/lhome/gengq/riscv64-linux-mastertest/libexec/gcc/riscv64-unknown-linux-gnu/11.0.0/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /lhome/gengq/riscv-gnu-toolchain-master/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/lhome/gengq/riscv64-linux-mastertest --with-sysroot=/lhome/gengq/riscv64-linux-mastertest/sysroot --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=.././riscv-gcc --disable-multilib --with-abi=lp64d --with-arch=rv64gcpxthead 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' Thread model: posix riscv64-unknown-linux-gnu-gcc -march=rv32imac -mabi=ilp32 needflax.c -O2 -S needflax.c: In function 'flax': needflax.c:6:3: note: use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts 6 | return a; | ^~~~~~ needflax.c:6:10: error: incompatible types when returning type 'int32x2_t' {aka '__vector(2) int'} but 'lint32x2_t' {aka '__vector(2) long int'} was expected 6 | return a; | ^