aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-06-16 10:53:15 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-06-16 13:57:46 -0700
commit33caee556c130b2dcf311480314e942a43d6b368 (patch)
tree2af444d011f37566dc092cc2d8afa3337c20991c /gcc
parent59dfce6d618ccf5865dec216603dbc25a4f7bf2d (diff)
downloadgcc-33caee556c130b2dcf311480314e942a43d6b368.zip
gcc-33caee556c130b2dcf311480314e942a43d6b368.tar.gz
gcc-33caee556c130b2dcf311480314e942a43d6b368.tar.bz2
aarch64: Fix reg_is_wrapped_separately array size [PR100211]
Currrently the size of the array reg_is_wrapped_separately is LAST_SAVED_REGNUM. But LAST_SAVED_REGNUM could be regno that is being saved. So the size needs to be `LAST_SAVED_REGNUM + 1` like aarch64_frame->reg_offset is. Committed as obvious after a bootstrap/test for aarch64-linux-gnu. gcc/ChangeLog: PR target/100211 * config/aarch64/aarch64.h (machine_function): Fix the size of reg_is_wrapped_separately. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 0997b82..2b89f6f 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -1059,7 +1059,7 @@ typedef struct GTY (()) machine_function
{
struct aarch64_frame frame;
/* One entry for each hard register. */
- bool reg_is_wrapped_separately[LAST_SAVED_REGNUM];
+ bool reg_is_wrapped_separately[LAST_SAVED_REGNUM + 1];
/* One entry for each general purpose register. */
rtx call_via[SP_REGNUM];