1 /* Verify that we get the low part of the long long as an int. We
2 used to get it wrong on big-endian machines, if register allocation
3 succeeded at all. We use volatile to make sure the long long is
4 actually truncated to int, in case a single register is wide enough
6 /* { dg-skip-if "asm would require extra shift-left-4-byte" { spu-*-* } } */
7 /* { dg-skip-if "asm requires register allocation" { nvptx-*-* } } */
11 ll_to_int (long long x
, volatile int *p
)
14 asm ("" : "=r" (i
) : "0" (x
));
18 int val
= INT_MIN
+ 1;
23 ll_to_int ((long long)val
, &i
);