1f08c3bdfSopenharmony_cistatic unsigned very_big_shift(unsigned int a) 2f08c3bdfSopenharmony_ci{ 3f08c3bdfSopenharmony_ci unsigned r = 0; 4f08c3bdfSopenharmony_ci r |= a << (0ULL ^ ~0U); 5f08c3bdfSopenharmony_ci r |= a << ((( signed long long) ~0U) + 1); 6f08c3bdfSopenharmony_ci r |= a << (((unsigned long long) ~0U) + 1); 7f08c3bdfSopenharmony_ci r |= a << (~((unsigned long long) ~0U)); 8f08c3bdfSopenharmony_ci return r; 9f08c3bdfSopenharmony_ci} 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_ci/* 12f08c3bdfSopenharmony_ci * check-name: shift-undef-long 13f08c3bdfSopenharmony_ci * check-command: sparse -m64 $file 14f08c3bdfSopenharmony_ci * 15f08c3bdfSopenharmony_ci * check-error-start 16f08c3bdfSopenharmony_cishift-undef-long.c:4:25: warning: shift count is negative (-1) 17f08c3bdfSopenharmony_cishift-undef-long.c:5:47: warning: shift too big (4294967296) for type unsigned int 18f08c3bdfSopenharmony_cishift-undef-long.c:7:20: warning: shift count is negative (-4294967296) 19f08c3bdfSopenharmony_ci * check-error-end 20f08c3bdfSopenharmony_ci */ 21