xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/loop00.c (revision c85f09cc92abd00c84e58ec9f0f5d942906cb713)

loop00(int n)1*c85f09ccSJohn Levon int loop00(int n)
2*c85f09ccSJohn Levon {
3*c85f09ccSJohn Levon 	int i, r = 0;
4*c85f09ccSJohn Levon 
5*c85f09ccSJohn Levon 	for (i = 1; i <= n; ++i)
6*c85f09ccSJohn Levon 		r += i;
7*c85f09ccSJohn Levon 	return r;
8*c85f09ccSJohn Levon }
9*c85f09ccSJohn Levon 
10*c85f09ccSJohn Levon /*
11*c85f09ccSJohn Levon  * check-name: loop00
12*c85f09ccSJohn Levon  * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
13*c85f09ccSJohn Levon  * check-output-ignore
14*c85f09ccSJohn Levon  * check-output-excludes: store\\.
15*c85f09ccSJohn Levon  * check-output-excludes: load\\.
16*c85f09ccSJohn Levon  */
17