From: Tamar Christina Date: Tue, 30 Aug 2022 06:48:21 +0000 (+0100) Subject: middle-end: intialize regnum in store_bit_field_1 X-Git-Tag: basepoints/gcc-14~4949 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=368dbb23c5efaf86b2b18945508d379713c0d12c;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/expmed.cc b/gcc/expmed.cc index 8d7418be4184..cdc0adb38920 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))))