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.
This commit is contained in:
Marcus Comstedt 2021-03-19 20:49:07 +01:00 committed by Kito Cheng
parent 28bddf0e32
commit 4eb3a801a5

View File

@ -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;