aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2022-08-30 07:48:21 +0100
committerTamar Christina <tamar.christina@arm.com>2022-08-30 07:48:21 +0100
commit368dbb23c5efaf86b2b18945508d379713c0d12c (patch)
tree8f86795a98b4410de7c3203affbc54050a69357b
parent0b47752e7e5169370c84eb30016b3aeac06ddc5e (diff)
downloadgcc-368dbb23c5efaf86b2b18945508d379713c0d12c.zip
gcc-368dbb23c5efaf86b2b18945508d379713c0d12c.tar.gz
gcc-368dbb23c5efaf86b2b18945508d379713c0d12c.tar.bz2
middle-end: intialize regnum in store_bit_field_1
This initializes regnum to 0 for when undefined_p. 0 is the right default as it's supposed to get the lowpart when undefined. gcc/ChangeLog: * expmed.cc (store_bit_field_1): Initialize regnum to 0.
-rw-r--r--gcc/expmed.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expmed.cc b/gcc/expmed.cc
index 8d7418b..cdc0adb 100644
--- a/gcc/expmed.cc
+++ b/gcc/expmed.cc
@@ -794,7 +794,7 @@ store_bit_field_1 (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum,
words or to cope with mode punning between equal-sized modes.
In the latter case, use subreg on the rhs side, not lhs. */
rtx sub;
- HOST_WIDE_INT regnum;
+ HOST_WIDE_INT regnum = 0;
poly_uint64 regsize = REGMODE_NATURAL_SIZE (GET_MODE (op0));
if (known_eq (bitnum, 0U)
&& known_eq (bitsize, GET_MODE_BITSIZE (GET_MODE (op0))))