https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116148

--- Comment #11 from Kewen Lin <linkw at gcc dot gnu.org> ---
Well, I guess the hppa issue isn't due to endianness any more, but the
signedness of char. 0x8f as signed char would be promoted to ffffff8f, which is
unexpected.

Could you help to verify it can pass with -funsigned-char?

If it passes, then it can be fixed with:

diff --git a/gcc/testsuite/c-c++-common/fam-in-union-alone-in-struct-2.c
b/gcc/testsuite/c-c++-common/fam-in-union-alone-in-struct-2.c
index 7845a7fbab3..49960a3b45f 100644
--- a/gcc/testsuite/c-c++-common/fam-in-union-alone-in-struct-2.c
+++ b/gcc/testsuite/c-c++-common/fam-in-union-alone-in-struct-2.c
@@ -14,7 +14,7 @@ union with_fam_2 {
 } with_fam_2_v = {.a = 0x1f2f3f4f};

 union with_fam_3 {
-  char a[];
+  unsigned char a[];
   int b[];
 } with_fam_3_v = {.b = {0x1f2f3f4f, 0x5f6f7f8f}};

Reply via email to