1f08c3bdfSopenharmony_ci/* 2f08c3bdfSopenharmony_ci * Al Viro points out that we don't 3f08c3bdfSopenharmony_ci * do bitfield -> integer promotions 4f08c3bdfSopenharmony_ci * for array dereferences 5f08c3bdfSopenharmony_ci * 6f08c3bdfSopenharmony_ci * "warning: a.c:16:10: incompatible types for operation" 7f08c3bdfSopenharmony_ci */ 8f08c3bdfSopenharmony_cistatic struct { 9f08c3bdfSopenharmony_ci int x:4; 10f08c3bdfSopenharmony_ci} y; 11f08c3bdfSopenharmony_ci 12f08c3bdfSopenharmony_ciextern int a[]; 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_cistatic int b(void) 15f08c3bdfSopenharmony_ci{ 16f08c3bdfSopenharmony_ci return a[y.x]; 17f08c3bdfSopenharmony_ci} 18f08c3bdfSopenharmony_ci 19f08c3bdfSopenharmony_ci/* 20f08c3bdfSopenharmony_ci * check-name: bitfield to integer promotion 21f08c3bdfSopenharmony_ci */ 22