[Bug target/115840] RISC-V with V:‘({anonymous})’ may be used uninitialized
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 12 09:31:50 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115840
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by YunQiang Su <syq@gcc.gnu.org>:
https://gcc.gnu.org/g:cff270707f107aff207f4afa73092a2d0731b032
commit r14-10411-gcff270707f107aff207f4afa73092a2d0731b032
Author: YunQiang Su <yunqiang@isrc.iscas.ac.cn>
Date: Thu Jul 11 20:43:54 2024 +0800
RISC-V: NO_WARNING preferred else value for RVV
PR target/115840.
In riscv_preferred_else_value, we create an uninitialized tmp var
for else value, instead of the 0 (as default_preferred_else_value)
or the pre-exists VAR (as aarch64 does), so that we can use agnostic
policy.
The problem is that `warn_uninit` will emit a warning:
'({anonymous})' may be used uninitialized
Let's mark this tmp var as NO_WARNING.
This problem is found when I try to build glibc with V extension.
gcc
PR target/115840
* config/riscv/riscv.cc(riscv_preferred_else_value): Mark
tmp_var as NO_WARNING.
gcc/testsuite
* gcc.dg/vect/pr115840.c: New testcase.
(cherry picked from commit c6f38e5e6d900b8ed6a4f5c126d3197946cad4dd)
More information about the Gcc-bugs
mailing list