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: * config/aarch64/aarch64.h (machine_function): Fix the size of reg_is_wrapped_separately. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> --- gcc/config/aarch64/aarch64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 0997b82dbc0..2b89f6f88ef 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]; -- 2.43.0