• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define S1	2
2 #define S2	5
3 #define S	(S2 - S1)
4 
5 #define	A	(1 << S1)
6 #define	B	(1 << S2)
7 
foo(int p)8 int foo(int p) { return ((p & A) ? B : 0) == ((((unsigned)p) & A) << S); }
bar(int p)9 int bar(int p) { return ((p & B) ? A : 0) == ((((unsigned)p) & B) >> S); }
10 
11 /*
12  * check-name: select-and-shift
13  * check-command: test-linearize -Wno-decl $file
14  *
15  * check-output-ignore
16  * check-output-returns: 1
17  */
18