[committed] Fix signed char test assumption [Was Re: [Linaro-TCWG-CI] gcc-17-2261-g649b2a6d9f9f: 7 regressions on arm]

Jeffrey Law via Gcc-regression <[email protected]> Fri, 17 Jul 2026 07:17:03 -0600
Newsgroups gmane.comp.gcc.regression,gmane.linux.linaro.toolchain,gmane.comp.gcc.patches
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------aj8LiTJOM8SRmIwip4xx2J0N
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit



On 7/9/2026 4:56 PM, [email protected] wrote:
> Dear contributor,
>
> Our automatic CI has detected problems related to your patch(es). Please find some details below.
>
> In  armv8l-unknown-linux-gnueabihf native, after:
>    | commit gcc-17-2261-g649b2a6d9f9f
>    | Author: Jeff Law <[email protected]>
>    | Date:   Wed Jul 8 12:30:56 2026 -0600
>    |
>    |     [PR rtl-optimization/126136] Fix dest = cond ? x : -1 when STORE_FLAG_VALUE is -1
>    |
>    |     So a while back I added support for selecting x/-1 into the ifcvt.cc by using
>    |     scc and a couple ALU operations.  That code explicitly rejects STORE_FLAG_VALUE
>    |     if it is not 1 or -1.
>    | ... 20 lines of the commit log omitted.
>
> Produces 7 regressions:
>    |
>    | regressions.sum:
>    | Running gcc:gcc.dg/torture/dg-torture.exp ...
>    | FAIL: gcc.dg/torture/pr126136.c -O0  execution test
>    | FAIL: gcc.dg/torture/pr126136.c -O1  execution test
>    | FAIL: gcc.dg/torture/pr126136.c -O2  execution test
>    | FAIL: gcc.dg/torture/pr126136.c -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
>    | ... and 3 more
>
> Used configuration :
>   *CI config* tcwg_gcc_check armv8l-unknown-linux-gnueabihf
>   *configure and test flags:* none, autodetected on armv8l-unknown-linux-gnueabihf--disable-multilib --with-float=hard --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=neon-fp-armv8
>
> We track this bug report under https://linaro.atlassian.net/browse/GNU-1959. (Require Linaro login) Please let us know if you have a fix.

As others noted, this is a case where the test assumed signed chars.  
The patch makes the signedness explicit.

Bootstrapped and regression tested on armv7 and verified the test now 
passes on that platform.  Pushing to the trunk.

jeff
--------------aj8LiTJOM8SRmIwip4xx2J0N
Content-Type: text/plain; charset=UTF-8; name="0014-test.patch"
Content-Disposition: attachment; filename="0014-test.patch"
Content-Transfer-Encoding: base64

Z2NjL3Rlc3RzdWl0ZQoKCSogZ2NjLmRnL3RvcnR1cmUvcHIxMjYxMzY6IE1ha2UgY2hhcnMg
ZXhwbGljaXRseSBzaWduZWQuCgpkaWZmIC0tZ2l0IGEvZ2NjL3Rlc3RzdWl0ZS9nY2MuZGcv
dG9ydHVyZS9wcjEyNjEzNi5jIGIvZ2NjL3Rlc3RzdWl0ZS9nY2MuZGcvdG9ydHVyZS9wcjEy
NjEzNi5jCmluZGV4IGNjMjcwZjUxY2EyLi4wYWIwMWE0NWQ0OSAxMDA2NDQKLS0tIGEvZ2Nj
L3Rlc3RzdWl0ZS9nY2MuZGcvdG9ydHVyZS9wcjEyNjEzNi5jCisrKyBiL2djYy90ZXN0c3Vp
dGUvZ2NjLmRnL3RvcnR1cmUvcHIxMjYxMzYuYwpAQCAtMyw3ICszLDcgQEAKIGludCBpOwog
CiBfX2F0dHJpYnV0ZV9fICgobm9pcGEsbm9jbG9uZSxub2lubGluZSkpCi1jaGFyIGZvbyhj
aGFyIHZhbCkKK3NpZ25lZCBjaGFyIGZvbyhzaWduZWQgY2hhciB2YWwpCiB7CiAgIGkrKzsK
ICAgaWYgKGkgPiAxKQo=

--------------aj8LiTJOM8SRmIwip4xx2J0N--