]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: Fix fam-in-union-alone-in-struct-2.c with unsigned char [PR116148]
authorKewen Lin <linkw@linux.ibm.com>
Wed, 14 Aug 2024 02:25:13 +0000 (21:25 -0500)
committerKewen Lin <linkw@gcc.gnu.org>
Wed, 14 Aug 2024 02:25:13 +0000 (21:25 -0500)
commit10972e6fb59cf83e12dcf7d5d6db01aa8e38dc52
tree0217f9cee1e3a5c694d2ac4a5501037c0717cdbe
parentc3c83d22d212a35cb1bfb8727477819463f0dcd8
testsuite: Fix fam-in-union-alone-in-struct-2.c with unsigned char [PR116148]

As PR116148#c7 shows, fam-in-union-alone-in-struct-2.c still
fails on hppa which is a BE environment, but by checking more
(also confirmed by John in PR116148#c12), it's due to that
signedness of plain char on hppa is signed therefore the value
of with_fam_3_v.a[7] "8f" get sign extended as "ffffff8f" then
the verification will fail.  This patch is to change plain char
with unsigned char to avoid that.

PR testsuite/116148

gcc/testsuite/ChangeLog:

* c-c++-common/fam-in-union-alone-in-struct-2.c: Change the type of
member a[] of union with_fam_3 with unsigned char.
gcc/testsuite/c-c++-common/fam-in-union-alone-in-struct-2.c