xref: /illumos-gate/usr/src/tools/smatch/src/validation/backend/shift-special.c (revision c85f09cc92abd00c84e58ec9f0f5d942906cb713)
1*c85f09ccSJohn Levon long shift(long a, short b);
shift(long a,short b)2*c85f09ccSJohn Levon long shift(long a, short b)
3*c85f09ccSJohn Levon {
4*c85f09ccSJohn Levon 	long r1 = a << b;
5*c85f09ccSJohn Levon 	long r2 = b << a;
6*c85f09ccSJohn Levon 
7*c85f09ccSJohn Levon 	return r1 + r2;
8*c85f09ccSJohn Levon }
9*c85f09ccSJohn Levon 
10*c85f09ccSJohn Levon /*
11*c85f09ccSJohn Levon  * check-name: shift-special
12*c85f09ccSJohn Levon  * check-command: sparsec -c $file -o tmp.o
13*c85f09ccSJohn Levon  */
14