public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb'
@ 2023-03-21  8:54 malat at debian dot org
  2023-03-21 10:27 ` [Bug c/109228] " kito at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: malat at debian dot org @ 2023-03-21  8:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

            Bug ID: 109228
           Summary: warning: implicit declaration of function
                    '__riscv_vlenb'
           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: ---

On riscv64 I am getting the following error with gcc-13:

% cat t.c
#include <riscv_vector.h>

unsigned long test_vlenb(void) {
  return __riscv_vlenb();
}

Leads to:


% LIBRARY_PATH=/usr/lib/gcc-snapshot/lib /usr/lib/gcc-snapshot/bin/gcc 
-march=rv64gcv1p0  -c -v t.c
Using built-in specs.
COLLECT_GCC=/usr/lib/gcc-snapshot/bin/gcc
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20230315-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.1 20230315 (experimental) [master r13-6680-ga9ae16db8cb]
(Debian 20230315-1)
COLLECT_GCC_OPTIONS='-march=rv64gcv1p0' '-c' '-v' '-mabi=lp64d'
'-misa-spec=20191213'
'-march=rv64imafdc_v1p0_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b'
 /usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13/cc1 -quiet -v
-imultilib . -imultiarch riscv64-linux-gnu t.c -quiet -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/ccJgYXea.s
GNU C17 (Debian 20230315-1) version 13.0.1 20230315 (experimental) [master
r13-6680-ga9ae16db8cb] (riscv64-linux-gnu)
        compiled by GNU C version 13.0.1 20230315 (experimental) [master
r13-6680-ga9ae16db8cb], GMP version 6.2.1, MPFR version 4.2.0, MPC version
1.3.1, isl version isl-0.25-GMP

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
 /usr/local/include
 /usr/lib/gcc-snapshot/include
 /usr/include/riscv64-linux-gnu
 /usr/include
End of search list.
Compiler executable checksum: 81700f2a313a464c1070ea0a35a4372b
t.c: In function 'test_vlenb':
t.c:4:10: warning: implicit declaration of function '__riscv_vlenb'; did you
mean '__riscv_vlm_v_b1'? [-Wimplicit-function-declaration]
    4 |   return __riscv_vlenb();
      |          ^~~~~~~~~~~~~
      |          __riscv_vlm_v_b1
COLLECT_GCC_OPTIONS='-march=rv64gcv1p0' '-c' '-v' '-mabi=lp64d'
'-misa-spec=20191213'
'-march=rv64imafdc_v1p0_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b'
 as -v --traditional-format -march=rv64gcv1p0
-march=rv64imafdc_v1p0_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b
-mabi=lp64d -misa-spec=20191213 -o t.o /tmp/ccJgYXea.s
GNU assembler version 2.40 (riscv64-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.40
COMPILER_PATH=/usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13/:/usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13/:/usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/:/usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/:/usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc-snapshot/lib/:/usr/lib/gcc-snapshot/lib/gcc/riscv64-linux-gnu/13/:/lib/riscv64-linux-gnu/:/lib/:/usr/lib/riscv64-linux-gnu/:/usr/lib/
COLLECT_GCC_OPTIONS='-march=rv64gcv1p0' '-c' '-v' '-mabi=lp64d'
'-misa-spec=20191213'
'-march=rv64imafdc_v1p0_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/109228] warning: implicit declaration of function '__riscv_vlenb'
  2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
@ 2023-03-21 10:27 ` kito at gcc dot gnu.org
  2023-03-21 11:09 ` [Bug target/109228] " malat at debian dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kito at gcc dot gnu.org @ 2023-03-21 10:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

Kito Cheng <kito at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kito at gcc dot gnu.org

--- Comment #1 from Kito Cheng <kito at gcc dot gnu.org> ---
Thanks for report! we definitely missed that...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/109228] warning: implicit declaration of function '__riscv_vlenb'
  2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
  2023-03-21 10:27 ` [Bug c/109228] " kito at gcc dot gnu.org
@ 2023-03-21 11:09 ` malat at debian dot org
  2023-03-22  5:07 ` juzhe.zhong at rivai dot ai
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: malat at debian dot org @ 2023-03-21 11:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

--- Comment #2 from Mathieu Malaterre <malat at debian dot org> ---
For later reference:

* https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/216/files

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/109228] warning: implicit declaration of function '__riscv_vlenb'
  2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
  2023-03-21 10:27 ` [Bug c/109228] " kito at gcc dot gnu.org
  2023-03-21 11:09 ` [Bug target/109228] " malat at debian dot org
@ 2023-03-22  5:07 ` juzhe.zhong at rivai dot ai
  2023-03-23  3:22 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-03-22  5:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

--- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Fixed by the following patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614397.html

Let's wait for review and merged.

Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/109228] warning: implicit declaration of function '__riscv_vlenb'
  2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
                   ` (2 preceding siblings ...)
  2023-03-22  5:07 ` juzhe.zhong at rivai dot ai
@ 2023-03-23  3:22 ` cvs-commit at gcc dot gnu.org
  2023-03-23  3:24 ` kito at gcc dot gnu.org
  2023-03-23  6:58 ` jan.wassenberg at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-23  3:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kito Cheng <kito@gcc.gnu.org>:

https://gcc.gnu.org/g:116a8678840f9f52ec14639ff07e302a8c429f32

commit r13-6822-g116a8678840f9f52ec14639ff07e302a8c429f32
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date:   Wed Mar 22 13:06:23 2023 +0800

    RISC-V: Implement __riscv_vlenb PR109228

    __riscv_vlenb is defined in RVV intrinsic spec 0.11 and used in some
project
    like google/highway.

    gcc/ChangeLog:

            PR target/109228
            * config/riscv/riscv-vector-builtins-bases.cc (class vlenb): Add
            __riscv_vlenb support.
            (BASE): Ditto.
            * config/riscv/riscv-vector-builtins-bases.h: Ditto.
            * config/riscv/riscv-vector-builtins-functions.def (vlenb): Ditto.
            * config/riscv/riscv-vector-builtins-shapes.cc (struct vlenb_def):
Ditto.
            (SHAPE): Ditto.
            * config/riscv/riscv-vector-builtins-shapes.h: Ditto.
            * config/riscv/riscv-vector-builtins.cc: Ditto.

    gcc/testsuite/ChangeLog:

            PR target/109228
            * gcc.target/riscv/rvv/base/vlenb-1.c: New test.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/109228] warning: implicit declaration of function '__riscv_vlenb'
  2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
                   ` (3 preceding siblings ...)
  2023-03-23  3:22 ` cvs-commit at gcc dot gnu.org
@ 2023-03-23  3:24 ` kito at gcc dot gnu.org
  2023-03-23  6:58 ` jan.wassenberg at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: kito at gcc dot gnu.org @ 2023-03-23  3:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

Kito Cheng <kito at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Kito Cheng <kito at gcc dot gnu.org> ---
Fixed!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/109228] warning: implicit declaration of function '__riscv_vlenb'
  2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
                   ` (4 preceding siblings ...)
  2023-03-23  3:24 ` kito at gcc dot gnu.org
@ 2023-03-23  6:58 ` jan.wassenberg at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jan.wassenberg at gmail dot com @ 2023-03-23  6:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228

--- Comment #6 from Jan Wassenberg <jan.wassenberg at gmail dot com> ---
Nice, thank you Mathieu, Kito and JuzheZhong!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-23  6:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21  8:54 [Bug c/109228] New: warning: implicit declaration of function '__riscv_vlenb' malat at debian dot org
2023-03-21 10:27 ` [Bug c/109228] " kito at gcc dot gnu.org
2023-03-21 11:09 ` [Bug target/109228] " malat at debian dot org
2023-03-22  5:07 ` juzhe.zhong at rivai dot ai
2023-03-23  3:22 ` cvs-commit at gcc dot gnu.org
2023-03-23  3:24 ` kito at gcc dot gnu.org
2023-03-23  6:58 ` jan.wassenberg at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).