diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 80e21dced64..55f2e967325 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-04-15 Andrea Corallo + + * config/aarch64/falkor-tag-collision-avoidance.c + (valid_src_p): Check for aarch64_address_info type before + accessing base field. + 2020-04-15 Andre Vieira * config/arm/mve.md (mve_vec_duplicate): New pattern. diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.c b/gcc/config/aarch64/falkor-tag-collision-avoidance.c index f850153fae0..a96a3320e8f 100644 --- a/gcc/config/aarch64/falkor-tag-collision-avoidance.c +++ b/gcc/config/aarch64/falkor-tag-collision-avoidance.c @@ -538,7 +538,11 @@ valid_src_p (rtx src, rtx_insn *insn, struct loop *loop, bool *pre_post, if (!aarch64_classify_address (&addr, XEXP (x, 0), mode, true)) return false; - if (!REG_P (addr.base)) + if (addr.type != ADDRESS_REG_IMM + && addr.type != ADDRESS_REG_WB + && addr.type != ADDRESS_REG_REG + && addr.type != ADDRESS_REG_UXTW + && addr.type != ADDRESS_REG_SXTW) return false; unsigned regno = REGNO (addr.base);