[PATCH 3/4] remove %K from error() calls in the aarch64/arm back ends (PR 98512)
Christophe LYON
christophe.lyon@foss.st.com
Thu Jul 1 08:01:35 GMT 2021
On 30/06/2021 21:56, Martin Sebor via Gcc-patches wrote:
> 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
>
Hi,
I hope I got it right, but there are a few regressions on aarch64/arm:
http://people.linaro.org/~christophe.lyon/cross-validation/gcc-test-patches/r12-1929-gf6bc9d9bddad7f9e3aad939bb6750770ac67f003-martin.patch
The patch I applied is
https://people.linaro.org/~christophe.lyon/cross-validation/gcc-test-patches/r12-1929-gf6bc9d9bddad7f9e3aad939bb6750770ac67f003-martin.patch/commit.txt
The regressions are the same on aarch64/arm:
Executed from: gcc.dg/format/format.exp
gcc.dg/format/c90-printf-1.c %s with NULL (test for warnings, line 243)
gcc.dg/format/c90-printf-1.c (test for excess errors)
gcc.dg/format/c90-printf-1.c -DWIDE %s with NULL (test for warnings, line 243)
gcc.dg/format/c90-printf-1.c -DWIDE (test for excess errors)
Executed from: gcc.dg/dg.exp
gcc.dg/pr79214.c (test for warnings, line 25)
gcc.dg/pr79214.c (test for warnings, line 30)
gcc.dg/pr79214.c (test for warnings, line 35)
gcc.dg/pr79214.c (test for warnings, line 40)
gcc.dg/pr79214.c (test for warnings, line 45)
gcc.dg/pr79214.c (test for warnings, line 52)
gcc.dg/pr79214.c (test for warnings, line 59)
gcc.dg/pr79214.c (test for warnings, line 66)
gcc.dg/pr79214.c (test for warnings, line 73)
gcc.dg/pr79214.c (test for warnings, line 80)
gcc.dg/pr79214.c (test for warnings, line 87)
If you want to see the corresponding gcc.log, you can click on "log" in
the red cells of the top-level report.
HTH
Christophe
> Thanks
> Martin
More information about the Gcc-patches
mailing list