1f08c3bdfSopenharmony_cistatic void foo(int *buf) 2f08c3bdfSopenharmony_ci{ 3f08c3bdfSopenharmony_ci int a = 1; 4f08c3bdfSopenharmony_ci int *b; 5f08c3bdfSopenharmony_ci do { 6f08c3bdfSopenharmony_ci if (a) 7f08c3bdfSopenharmony_ci b = buf; 8f08c3bdfSopenharmony_ci if (a) 9f08c3bdfSopenharmony_ci *buf = 0; 10f08c3bdfSopenharmony_ci } while (!(a = !a)); 11f08c3bdfSopenharmony_ci} 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ci/* 14f08c3bdfSopenharmony_ci * check-name: infinite loop 03 15f08c3bdfSopenharmony_ci * check-command: sparse -Wno-decl $file 16f08c3bdfSopenharmony_ci * check-timeout: 17f08c3bdfSopenharmony_ci */ 18