PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / shiftdi.c
blob7e0409800c43744038b363eb767de3c426079c88
1 /* { dg-require-effective-target int32plus } */
3 /* Failed on sparc with -mv8plus because sparc.c:set_extends() thought
4 erroneously that SImode ASHIFT chops the upper bits, it does not. */
6 typedef unsigned long long uint64;
8 void g(uint64 x, int y, int z, uint64 *p)
10 unsigned w = ((x >> y) & 0xffffffffULL) << (z & 0x1f);
11 *p |= (w & 0xffffffffULL) << z;
14 int main(void)
16 uint64 a = 0;
17 g(0xdeadbeef01234567ULL, 0, 0, &a);
18 return (a == 0x01234567) ? 0 : 1;