https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108927
Bug ID: 108927 Summary: error: too few arguments to function 'long unsigned int __riscv_vsetvlmax_e8mf8(void)' Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: malat at debian dot org Target Milestone: --- For some reason riscv64 rvv extension is broken. It is supposed to work with the new naming convention: * https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg298381.html % head ./gcc/testsuite/gcc.target/riscv/rvv/base/vsetvl-1.c /* { dg-do compile } */ /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */ However consider now ``` % cat t.c #include <riscv_vector.h> int main() { size_t vl = __riscv_vsetvlmax_e8mf8(); return vl; } ``` gives: ``` g++ -march=rv64gcv1p0 t.c t.c: In function 'int main()': t.c:5:39: error: too few arguments to function 'long unsigned int __riscv_vsetvlmax_e8mf8(void)' 5 | size_t vl = __riscv_vsetvlmax_e8mf8(); | ~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from t.c:1: /usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/include/riscv_vector.h:94:25: note: declared here 94 | #pragma riscv intrinsic "vector" | ^~~~~~~~ ``` Full log: % LIBRARY_PATH=/usr/lib/gcc-snapshot/lib /usr/lib/gcc-snapshot/bin/g++ -march=rv64gcv1p0 -v t.c Using built-in specs. COLLECT_GCC=/usr/lib/gcc-snapshot/bin/g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13/lto-wrapper Target: riscv64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 20230108-1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr/lib/gcc-snapshot --with-gcc-major-version-only --program-prefix= --enable-shared --enable-linker-build-id --disable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64gc --with-abi=lp64d --enable-checking=yes --build=riscv64-linux-gnu --host=riscv64-linux-gnu --target=riscv64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20230108 (experimental) [master r13-5059-gd901bf8a44a] (Debian 20230108-1) COLLECT_GCC_OPTIONS='-march=rv64gcv1p0' '-v' '-shared-libgcc' '-mabi=lp64d' '-misa-spec=20191213' '-march=rv64imafdc_v1p0_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b' '-dumpdir' 'a-' /usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13/cc1plus -quiet -v -imultilib . -imultiarch riscv64-linux-gnu -D_GNU_SOURCE t.c -quiet -dumpdir a- -dumpbase t.c -dumpbase-ext .c -march=rv64gcv1p0 -mabi=lp64d -misa-spec=20191213 -march=rv64imafdc_v1p0_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b -version -o /tmp/ccVVv6RI.s GNU C++17 (Debian 20230108-1) version 13.0.0 20230108 (experimental) [master r13-5059-gd901bf8a44a] (riscv64-linux-gnu) compiled by GNU C version 13.0.0 20230108 (experimental) [master r13-5059-gd901bf8a44a], GMP version 6.2.1, MPFR version 4.1.1-p1, MPC version 1.3.1, isl version isl-0.25-GMP warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "/usr/local/include/riscv64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/include-fixed/riscv64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/include-fixed" ignoring nonexistent directory "/usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/../../../../riscv64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13 /usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/riscv64-linux-gnu/. /usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/../../../../include/c++/13/backward /usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/include /usr/local/include /usr/lib/gcc-snapshot/include /usr/include/riscv64-linux-gnu /usr/include End of search list. GNU C++17 (Debian 20230108-1) version 13.0.0 20230108 (experimental) [master r13-5059-gd901bf8a44a] (riscv64-linux-gnu) compiled by GNU C version 13.0.0 20230108 (experimental) [master r13-5059-gd901bf8a44a], GMP version 6.2.1, MPFR version 4.1.1-p1, MPC version 1.3.1, isl version isl-0.25-GMP warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 8b0a1f9bde5380a9cce8ac18dbcd4399 t.c: In function 'int main()': t.c:5:39: error: too few arguments to function 'long unsigned int __riscv_vsetvlmax_e8mf8(void)' 5 | size_t vl = __riscv_vsetvlmax_e8mf8(); | ~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from t.c:1: /usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/include/riscv_vector.h:94:25: note: declared here 94 | #pragma riscv intrinsic "vector" | ^~~~~~~~