]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix tree-ssa/pr31261.c testcase after r16-400 [PR120168]
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 8 May 2025 16:12:07 +0000 (09:12 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Thu, 8 May 2025 17:20:33 +0000 (10:20 -0700)
commitd8dac49707e71844b4d1c21348d92addb19a0969
treea9ad34928cdb3b70f07fd66c4e0a6f0dbc908613
parenta2be0f970f89487adbd1f3c39338b9f321e918cf
Fix tree-ssa/pr31261.c testcase after r16-400 [PR120168]

AFter r16-400-g5e363ffefaceb9, on targets where char is unsigned by
default, tree-ssa/pr31261.c testcase started to fail:
FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original "return \\\\(char\\\\) -\\\\(unsigned char\\\\) c & 31;" 1

This is because the casts are no longer needed as both char and
unsigned char are the same signedness.
I was deciding between add -fsigned-char or changing the testcase
to use explicitly `signed char`. I went with using an explicit
`signed char` as that would be case normally.

PR testsuite/120168

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr31261.c: Use `signed char` instead
of plain char.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/gcc.dg/tree-ssa/pr31261.c