(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
Wdangling-pointer-10.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -Wdangling-pointer" } */
       3  
       4  struct S {
       5    int x;
       6  };
       7  
       8  void g (int **p)
       9  {
      10    struct S s = {};
      11    *p = &s.x; /* { dg-warning "address of local variable" } */
      12  }