On Tue, 30 Aug 2022, Tamar Christina wrote: > Hi All, > > This initializes regnum to 0 for when undefined_p. > 0 is the right default as it's supposed to get the lowpart > when undefined. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master?
OK. > Thanks, > Tamar > > gcc/ChangeLog: > > * expmed.cc (store_bit_field_1): Initialize regnum to 0. > > --- inline copy of patch -- > diff --git a/gcc/expmed.cc b/gcc/expmed.cc > index > 8d7418be418406e72a895ecddf2dc7fdb950c76c..cdc0adb389202a5cab79a8d89056ddc347fb28cb > 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))))