diff options
Diffstat (limited to 'gcc/config/sh/sh.c')
-rw-r--r-- | gcc/config/sh/sh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 14892ce..3c57730 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -3826,6 +3826,10 @@ untangle_mova (int *num_mova, rtx *first_mova, rtx new_mova) if (optimize) { + /* If NEW_MOVA has no address yet, it will be handled later. */ + if (INSN_ADDRESSES_SIZE() <= (unsigned) INSN_UID (new_mova)) + return -1; + n_addr = INSN_ADDRESSES (INSN_UID (new_mova)); n_target = INSN_ADDRESSES (INSN_UID (XEXP (MOVA_LABELREF (new_mova), 0))); if (n_addr > n_target || n_addr + 1022 < n_target) |