public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2258] middle-end: intialize regnum in store_bit_field_1
@ 2022-08-30 7:01 Tamar Christina
0 siblings, 0 replies; only message in thread
From: Tamar Christina @ 2022-08-30 7:01 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:368dbb23c5efaf86b2b18945508d379713c0d12c
commit r13-2258-g368dbb23c5efaf86b2b18945508d379713c0d12c
Author: Tamar Christina <tamar.christina@arm.com>
Date: Tue Aug 30 07:48:21 2022 +0100
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:
---
gcc/expmed.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/expmed.cc b/gcc/expmed.cc
index 8d7418be418..cdc0adb3892 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))))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-30 7:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 7:01 [gcc r13-2258] middle-end: intialize regnum in store_bit_field_1 Tamar Christina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).