(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
asan/
halt_on_error-1.c
       1  /* Test recovery mode.  */
       2  /* { dg-do run } */
       3  /* { dg-options "-fsanitize-recover=address" } */
       4  /* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=false" } */
       5  
       6  #include <string.h>
       7  
       8  volatile int ten = 10;
       9  
      10  int main() {
      11    char x[10];
      12    __builtin_memset(x, 0, ten + 1);
      13    asm volatile ("" : : : "memory");
      14    volatile int res = x[ten];
      15    x[ten] = res + 3;
      16    res = x[ten];
      17    return 0;
      18  }
      19  
      20  /* { dg-output "WRITE of size 11 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r).*" } */
      21  /* { dg-output "\[^\n\r]*READ of size 1 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r).*" } */
      22  /* { dg-output "\[^\n\r]*WRITE of size 1 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r).*" } */
      23  /* { dg-output "\[^\n\r]*READ of size 1 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r).*" } */