[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 08:31:15 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115840
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by YunQiang Su <syq@gcc.gnu.org>:
https://gcc.gnu.org/g:c6f38e5e6d900b8ed6a4f5c126d3197946cad4dd
commit r15-1995-gc6f38e5e6d900b8ed6a4f5c126d3197946cad4dd
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.
More information about the Gcc-bugs
mailing list