db/fixup_kernel.sh: fix clear_user() handling
[smatch.git] / validation / optim / select-and-shift.c
blob5313fe4b1d86909fbb4ed42b10137f512028e90e
1 #define S1 2
2 #define S2 5
3 #define S (S2 - S1)
5 #define A (1 << S1)
6 #define B (1 << S2)
8 int foo(int p) { return ((p & A) ? B : 0) == ((((unsigned)p) & A) << S); }
9 int bar(int p) { return ((p & B) ? A : 0) == ((((unsigned)p) & B) >> S); }
12 * check-name: select-and-shift
13 * check-command: test-linearize -Wno-decl $file
15 * check-output-ignore
16 * check-output-returns: 1