From 77253e5663a677ba0faf922adb54393c51622eb8 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Wed, 29 Oct 2008 23:54:35 +0000 Subject: re PR target/37909 (internal compiler error: in fixup_mova, at config/sh/sh.c:3756) PR target/37909 * config/sh/sh.c (untangle_mova): Return -1 when NEW_MOVA has no address. From-SVN: r141452 --- gcc/ChangeLog | 6 ++++++ gcc/config/sh/sh.c | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3448e3..725df9d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-10-29 Kaz Kojima + + PR target/37909 + * config/sh/sh.c (untangle_mova): Return -1 when NEW_MOVA has + no address. + 2008-10-29 David Edelsohn PR target/37878 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) -- cgit v1.1