PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-and-rshift-2.c
blob74edf42e481d63f815716190d3dc44bd27d4f9a9
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-original" } */
4 #if __SIZEOF_INT__ < 4
5 #define unsigned __UINT32_TYPE__
6 #endif
8 unsigned f(unsigned x)
10 return (x >> 29) & 32;
13 unsigned g(unsigned x)
15 return !!(x & 0x80000000) << 5;
18 unsigned j(unsigned x)
20 return ((x >> 31) & 1) ? 32 : 0;
23 unsigned k(unsigned x)
25 return (x & 0x80000000) ? 32 : 0;
28 /* { dg-final { scan-tree-dump-not " \\? " "original" } } */
29 /* { dg-final { scan-assembler-not "sall" { target i?86-*-* x86_64-*-* } } }" */