1 /* { dg-require-effective-target global_constructor } */
2 /* { dg-options "-O2 -fprofile-generate -fprofile-update=single -fdump-tree-optimized" } */
3
4 __attribute__ ((no_profile_instrument_function))
foo()5 int foo()
6 {
7 return 0;
8 }
9
10 __attribute__ ((no_profile_instrument_function))
bar()11 int bar()
12 {
13 return 1;
14 }
15
main()16 int main ()
17 {
18 return foo ();
19 }
20
21 /* { dg-final { scan-tree-dump-times "__gcov0\\.main.* = PROF_edge_counter" 1 "optimized"} } */
22 /* { dg-final { scan-tree-dump-times "__gcov_indirect_call_profiler_v2" 1 "optimized" } } */
23 /* { dg-final { scan-tree-dump-times "__gcov_time_profiler_counter = " 1 "optimized" } } */
24 /* { dg-final { scan-tree-dump-times "__gcov_init" 1 "optimized" } } */
25