11f5207b7SJohn Levon struct A { 21f5207b7SJohn Levon int a; 31f5207b7SJohn Levon int b[2]; 41f5207b7SJohn Levon }; 51f5207b7SJohn Levon 61f5207b7SJohn Levon struct B { 71f5207b7SJohn Levon int c; 81f5207b7SJohn Levon struct A d; 91f5207b7SJohn Levon }; 101f5207b7SJohn Levon 111f5207b7SJohn Levon static struct B a= {1, {1, {1, 1}}}; 121f5207b7SJohn Levon 131f5207b7SJohn Levon static int *b = &a.d.a; // OK 141f5207b7SJohn Levon static int *c = &(&a.d)->a; // OK 151f5207b7SJohn Levon static int *d = a.d.b; // OK 161f5207b7SJohn Levon static int *e = (&a.d)->b; // OK 171f5207b7SJohn Levon static int *f = &a.d.b[1]; // OK 181f5207b7SJohn Levon static int *g = &(&a.d)->b[1]; // OK 191f5207b7SJohn Levon 201f5207b7SJohn Levon /* 21*c85f09ccSJohn Levon * check-name: constexpr static object's member address 221f5207b7SJohn Levon * check-command: sparse -Wconstexpr-not-const $file 231f5207b7SJohn Levon * 241f5207b7SJohn Levon * check-error-start 251f5207b7SJohn Levon * check-error-end 261f5207b7SJohn Levon */ 27