[gcc(refs/vendors/riscv/heads/gcc-15-with-riscv-opts)] RISC-V: Default-initialize variable.
Jeff Law
law@gcc.gnu.org
Fri Jan 30 06:40:21 GMT 2026
https://gcc.gnu.org/g:d10b33641ee2cfd88a723ed8268243ceea564dd4
commit d10b33641ee2cfd88a723ed8268243ceea564dd4
Author: Robin Dapp <rdapp@ventanamicro.com>
Date: Thu May 8 10:17:26 2025 +0200
RISC-V: Default-initialize variable.
This patch initializes saved_vxrm_mode to VXRM_MODE_NONE. This is a
warning (but no error) when building the compiler so better fix it.
gcc/ChangeLog:
* config/riscv/riscv.cc (singleton_vxrm_need): Init
saved_vxrm_mode.
(cherry picked from commit e6fea0a8be95e2a1cbe733301a205b8c00db9202)
Diff:
---
gcc/config/riscv/riscv.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 7c0e445f3b83..a9969abac04c 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -12339,7 +12339,7 @@ singleton_vxrm_need (void)
/* Walk the IL noting if VXRM is needed and if there's more than one
mode needed. */
bool found = false;
- int saved_vxrm_mode;
+ int saved_vxrm_mode = VXRM_MODE_NONE;
for (rtx_insn *insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
if (!INSN_P (insn) || DEBUG_INSN_P (insn))
More information about the Gcc-cvs
mailing list