On Tue, Aug 25, 2026 at 09:35:03AM +0200, Andreas Schwab wrote:
> On Aug 25 2026, Andrea Pinski wrote:
> 
> >> diff --git a/gcc/testsuite/gcc.dg/torture/pr126650.c 
> >> b/gcc/testsuite/gcc.dg/torture/pr126650.c
> >> index 166705d9cfe..f9997b16f2b 100644
> >> --- a/gcc/testsuite/gcc.dg/torture/pr126650.c
> >> +++ b/gcc/testsuite/gcc.dg/torture/pr126650.c
> >> @@ -1,5 +1,13 @@
> >>  /* { dg-do run } */
> >>
> >> +#if __s390__
> >
> > I think this should be `__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__` instead.
> 
> No, it needs to depend on BITS_BIG_ENDIAN.  Byte order and bit order are
> independent, and gcc supports all combinations of them (the latter is
> usually constant even if the former is selectable).

Wouldn't it be better to
1) guard the test on #if __SIZEOF_INT__ == 4 && __CHAR_BIT__ == 8
2) compare the value against something computed surely at runtime,
   e.g. move the struct/union to file scope, add another variable (perhaps
   volatile) outside of main and initialize with { .e[3] = 7 } and pass as
   first argument to foo g.bf.c?

        Jakub

Reply via email to