From: Marcus Comstedt Date: Fri, 19 Mar 2021 19:49:07 +0000 (+0100) Subject: RISC-V: Update shift-shift-5.c testcase for big endian X-Git-Tag: basepoints/gcc-12~476 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4eb3a801a5ed947a50f941b63e30a0359fccf138;p=thirdparty%2Fgcc.git RISC-V: Update shift-shift-5.c testcase for big endian gcc/testsuite/ * gcc.target/riscv/shift-shift-5.c (sub): Change order of struct fields depending on byteorder. --- diff --git a/gcc/testsuite/gcc.target/riscv/shift-shift-5.c b/gcc/testsuite/gcc.target/riscv/shift-shift-5.c index 5b2ae89a471d..0ecab9723c9c 100644 --- a/gcc/testsuite/gcc.target/riscv/shift-shift-5.c +++ b/gcc/testsuite/gcc.target/riscv/shift-shift-5.c @@ -7,7 +7,11 @@ unsigned long sub (long l) { union u { +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ struct s { int a : 19; unsigned int b : 13; int x; } s; +#else + struct s { int x; unsigned int b : 13; int a : 19; } s; +#endif long l; } u; u.l = l;