https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123766
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by LuluCheng <[email protected]>: https://gcc.gnu.org/g:3534d9af5dce3775351595d3f7012ab7d4d34b89 commit r15-10754-g3534d9af5dce3775351595d3f7012ab7d4d34b89 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)
