Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
> index 7b37e1b602c..7cdc824730c 100644
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -13242,13 +13242,8 @@ bounds_check (rtx operand, HOST_WIDE_INT low, 
> HOST_WIDE_INT high,
>    lane = INTVAL (operand);
>  
>    if (lane < low || lane >= high)
> -    {
> -      if (exp)
> -     error ("%K%s %wd out of range %wd - %wd",
> -            exp, desc, lane, low, high - 1);
> -      else
> -     error ("%s %wd out of range %wd - %wd", desc, lane, low, high - 1);
> -    }
> +    error_at (EXPR_LOCATION (exp),
> +           "%s %wd out of range %wd - %wd", desc, lane, low, high - 1);
>  }
>  
>  /* Bounds-check lanes.  */

This part doesn't look safe: “exp” is null when called from arm_const_bounds.

Thanks,
Richard

Reply via email to