summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-09-01 14:36:11 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-09-01 14:36:11 +0000
commit8efab079194d16204286e3e9810116d55bec86a8 (patch)
treecee6a5093a88e780f042060809786d566e495c1e /gnu
parent83e4db67070efa626e571460b84aa03672ff9832 (diff)
Bounds check before addressing call_used_regs[], avoids segfaults in
fixup_match_2() on landisk building mysql; gcc PR #28467 help and prodding jsg@, ok kettenis@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gcc/gcc/regmove.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/regmove.c b/gnu/gcc/gcc/regmove.c
index 84c811a1d64..008aa48dd32 100644
--- a/gnu/gcc/gcc/regmove.c
+++ b/gnu/gcc/gcc/regmove.c
@@ -1033,7 +1033,7 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
if (REG_N_CALLS_CROSSED (REGNO (src)) == 0)
break;
- if (call_used_regs [REGNO (dst)]
+ if ((HARD_REGISTER_P (dst) && call_used_regs [REGNO (dst)])
|| find_reg_fusage (p, CLOBBER, dst))
break;
}