tree-optimization: Fix use of uninitialized variables warnings [PR94952]
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 5 May 2020 17:44:19 +0000 (19:44 +0200)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Mon, 18 May 2020 18:04:25 +0000 (20:04 +0200)
While bootstrapping GCC on S/390 with --enable-checking=release several
warnings about use of uninitialized variables bitpos, bitregion_start, and
bitregion_end of function pass_store_merging::process_store are raised.
According to PR94952 these seem to be false positives which are silenced by
initialising the mentioned variables.

Bootstrapped on S/390.  Ok for master and releases/gcc-10 assuming that
regtest succeeds (still running but I don't see a reason why it
should fail)?

gcc/ChangeLog:

2020-05-18  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>

PR tree-optimization/94952
* gimple-ssa-store-merging.c (pass_store_merging::process_store):
Initialize variables bitpos, bitregion_start, and bitregion_end in
order to silence warnings about use of uninitialized variables.

gcc/ChangeLog
gcc/gimple-ssa-store-merging.c

index 51b5b6c908dff4a6e675b965d151ec90632656ec..0a1ff053ffa50adb63631da7a9f5c473dd675d78 100644 (file)
@@ -1,3 +1,10 @@
+2020-05-18  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
+
+       PR tree-optimization/94952
+       * gimple-ssa-store-merging.c (pass_store_merging::process_store):
+       Initialize variables bitpos, bitregion_start, and bitregion_end in
+       order to silence warnings about use of uninitialized variables.
+
 2020-05-18  Carl Love  <cel@us.ibm.com>
 
        PR target/94833
index 25753517cc67d9fbb0c36c373d3da2f50c9f4170..c8e1877f54077b2c905994e177d85f3649d0a0e2 100644 (file)
@@ -4668,8 +4668,8 @@ pass_store_merging::process_store (gimple *stmt)
 {
   tree lhs = gimple_assign_lhs (stmt);
   tree rhs = gimple_assign_rhs1 (stmt);
-  poly_uint64 bitsize, bitpos;
-  poly_uint64 bitregion_start, bitregion_end;
+  poly_uint64 bitsize, bitpos = 0;
+  poly_uint64 bitregion_start = 0, bitregion_end = 0;
   tree base_addr
     = mem_valid_for_store_merging (lhs, &bitsize, &bitpos,
                                   &bitregion_start, &bitregion_end);