Initialize a variable due to -Wmaybe-uninitialized.
authorMartin Liska <mliska@suse.cz>
Tue, 19 Nov 2019 07:22:21 +0000 (08:22 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 19 Nov 2019 07:22:21 +0000 (07:22 +0000)
2019-11-19  Martin Liska  <mliska@suse.cz>

PR bootstrap/92540
* config/riscv/riscv.c (riscv_address_insns): Initialize
addr in order to remove boostrap -Wmaybe-uninitialized
error.

From-SVN: r278429

gcc/ChangeLog
gcc/config/riscv/riscv.c

index 11414b2384723c100f79a2ab028bf343817cc6df..ab841a228cb99e5cd7f061c99fc5615ff1263e27 100644 (file)
@@ -1,3 +1,10 @@
+2019-11-19  Martin Liska  <mliska@suse.cz>
+
+       PR bootstrap/92540
+       * config/riscv/riscv.c (riscv_address_insns): Initialize
+       addr in order to remove boostrap -Wmaybe-uninitialized
+       error.
+
 2019-11-18  Martin Sebor  <msebor@redhat.com>
 
        PR tree-optimization/92493
index 11a43c1b64d4485aa0340af21d5d772d7913e008..9aa4d266e6b81f06d56b70e0bfffeeb2b09076ed 100644 (file)
@@ -857,7 +857,7 @@ riscv_legitimate_address_p (machine_mode mode, rtx x, bool strict_p)
 int
 riscv_address_insns (rtx x, machine_mode mode, bool might_split_p)
 {
-  struct riscv_address_info addr;
+  struct riscv_address_info addr = {};
   int n = 1;
 
   if (!riscv_classify_address (&addr, x, mode, false))