1  /* { dg-do compile } */
       2  /* { dg-options "--param=tsan-instrument-func-entry-exit=0 -fdump-tree-gimple -fdump-tree-optimized" } */
       3  
       4  int x;
       5  
       6  __attribute__((noinline))
       7  void fn1(void)
       8  {
       9    x++;
      10  }
      11  
      12  __attribute__((noinline))
      13  void fn2(void)
      14  {
      15    fn1();
      16  }
      17  
      18  __attribute__((noinline))
      19  int main(int argc, char *argv[])
      20  {
      21    fn1();
      22    fn2();
      23    return 0;
      24  }
      25  
      26  // { dg-final { scan-tree-dump-not "TSAN_FUNC_EXIT" "gimple" } }
      27  // { dg-final { scan-tree-dump-not "__tsan_func_entry" "optimized" } }
      28  // { dg-final { scan-tree-dump-not "__tsan_func_exit" "optimized" } }
      29  // { dg-final { scan-tree-dump "__tsan_write" "optimized" } }