[PATCH 3/4] remove %K from error() calls in the aarch64/arm back ends (PR 98512)

Martin Sebor msebor@gmail.com
Wed Jun 30 19:56:56 GMT 2021


On 6/11/21 8:46 AM, Martin Sebor wrote:
> On 6/11/21 3:58 AM, Richard Sandiford wrote:
>> 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.
> 
> Doh!  Yes, will fix, thanks.

Attached is an updated patch with the test above restored.

Christophe, if you could apply it on top of patches 1 and 2 and run
the aarch64/arm tests that would be great!

Patch 1:
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573859.html
Patch 2:
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/574088.html

Thanks
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-98512-3.diff
Type: text/x-patch
Size: 6239 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210630/4f614651/attachment.bin>


More information about the Gcc-patches mailing list