]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Default-initialize variable.
authorRobin Dapp <rdapp@ventanamicro.com>
Thu, 8 May 2025 08:17:26 +0000 (10:17 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Fri, 23 May 2025 14:59:31 +0000 (16:59 +0200)
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.

gcc/config/riscv/riscv.cc

index 358d1ec5d32e92cd6a13e96866d87ba0ce0263b0..5c0c8beec3bd31f47ec0dec7bb6a942483433257 100644 (file)
@@ -12321,7 +12321,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))