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