summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c
blob: 0c7e09618249abf1bc1a99a9b83ed18383b3a2bd (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
/* { dg-require-effective-target global_constructor } */
/* { dg-options "-O2 -fprofile-generate -fprofile-update=single -fdump-tree-optimized" } */

__attribute__ ((no_profile_instrument_function))
int foo()
{
  return 0;
}

__attribute__ ((no_profile_instrument_function))
int bar()
{
  return 1;
}

int main ()
{
  return foo ();
}

/* { dg-final { scan-tree-dump-times "__gcov0\\.main.* = PROF_edge_counter" 1 "optimized"} } */
/* { dg-final { scan-tree-dump-times "__gcov_indirect_call_profiler_v" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__gcov_time_profiler_counter = " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__gcov_init" 1 "optimized" } } */