warn-access: wrong -Wdangling-pointer with labels [PR106080]
[official-gcc.git] / gcc / testsuite / c-c++-common / Wdangling-pointer-10.c
blobef553bdf2ce1a76a7a4c9e45f977e5d133297f60
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wdangling-pointer" } */
4 struct S {
5 int x;
6 };
8 void g (int **p)
10 struct S s = {};
11 *p = &s.x; /* { dg-warning "address of local variable" } */