https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123766
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by LuluCheng <[email protected]>: https://gcc.gnu.org/g:a3269cf939eedf1e0aa481306d6f60e50eccaec6 commit r14-12284-ga3269cf939eedf1e0aa481306d6f60e50eccaec6 Author: Lulu Cheng <[email protected]> Date: Tue Jan 27 10:31:36 2026 +0800 LoongArch: Fix bug123766. The pointer parameter type for the original store class builtin functions is CVPOINTER (const volatile void *). Taking the following test as an example: ``` v4i64 v = {0, 0, 0, 0}; void try_store() { long r[4]; __lasx_xvst(v, r, 0); } ``` At this point, the type of r is CVPOINTER, which means data in memory can only be read through r. Therefore, if the array r is not initialized, an uninitialized warning will be issued. This patch changes the pointer type of store-class builtin functions from CVPOINTER to VPOINTER (volatile void *). PR target/123766 gcc/ChangeLog: * config/loongarch/loongarch-builtins.cc (loongarch_build_vpointer_type): New function. Return a type for 'volatile void *'. (LARCH_ATYPE_VPOINTER): New macro. * config/loongarch/loongarch-ftypes.def: Change the pointer type of the store class function from CVPOINTER to VPOINTER. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/pr123766.c: New test. * gcc.target/loongarch/vector/lsx/pr123766.c: New test. (cherry picked from commit fde8a3008586b2b469b42813613e582d4724afa0)
