1f08c3bdfSopenharmony_cistruct A { 2f08c3bdfSopenharmony_ci int a; 3f08c3bdfSopenharmony_ci int b[2]; 4f08c3bdfSopenharmony_ci}; 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_cistruct B { 7f08c3bdfSopenharmony_ci int c; 8f08c3bdfSopenharmony_ci struct A d; 9f08c3bdfSopenharmony_ci}; 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_cistatic struct B a= {1, {1, {1, 1}}}; 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_cistatic int *b = &a.d.a; // OK 14f08c3bdfSopenharmony_cistatic int *c = &(&a.d)->a; // OK 15f08c3bdfSopenharmony_cistatic int *d = a.d.b; // OK 16f08c3bdfSopenharmony_cistatic int *e = (&a.d)->b; // OK 17f08c3bdfSopenharmony_cistatic int *f = &a.d.b[1]; // OK 18f08c3bdfSopenharmony_cistatic int *g = &(&a.d)->b[1]; // OK 19f08c3bdfSopenharmony_ci 20f08c3bdfSopenharmony_ci/* 21f08c3bdfSopenharmony_ci * check-name: constexpr static object's member address 22f08c3bdfSopenharmony_ci * check-command: sparse -Wconstexpr-not-const $file 23f08c3bdfSopenharmony_ci * 24f08c3bdfSopenharmony_ci * check-error-start 25f08c3bdfSopenharmony_ci * check-error-end 26f08c3bdfSopenharmony_ci */ 27