This is the mail archive of the
mailing list for the GCC project.
[patch committed] Fix PR target/37909
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Oct 2008 08:57:41 +0900 (JST)
- Subject: [patch committed] Fix PR target/37909
I've committed the attached patch to fix PR target/37909
which is formally a 4.2/4.3/4.4 regression. sh.c:untangle_mova
takes INSN_ADDRESSES of which has no insn address yet. The detail
description of the problem is in the above URL. It might be
latent problem in the previous compilers, but I wasn't able to
make a test case failing with them. I think that the patch would
be safe and enough for this rather rare failure.
The patch is tested with bootstrap and the top level "make -k check"
on sh4-unknown-linux-gnu with no new failures. I'll backport
the patch to branches when the usual tests are done successfully.
2008-10-29 Kaz Kojima <email@example.com>
* config/sh/sh.c (untangle_mova): Return -1 when NEW_MOVA has
--- ORIG/trunk/gcc/config/sh/sh.c 2008-10-22 09:11:15.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.c 2008-10-26 10:36:59.000000000 +0900
@@ -3826,6 +3826,10 @@ untangle_mova (int *num_mova, rtx *first
+ /* 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)