(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
asan/
pr106558.c
       1  /* { dg-do run } */
       2  /* { dg-options "-w -fpermissive" } */
       3  /* { dg-shouldfail "asan" } */
       4  
       5  int a;
       6  int *b = &a;
       7  int **c = &b;
       8  int d[1];
       9  int *e = &d[1];
      10  
      11  static int f(int *g) {
      12    *b = e;
      13    *c = e;
      14    *b = 2;
      15    *g = 2;
      16  }
      17  
      18  int main() {
      19      f(b);
      20      return *b;
      21  }
      22  
      23  /* { dg-output "AddressSanitizer: global-buffer-overflow on address" } */