diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c new file mode 100644 index 0000000000..c61b534a25 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c @@ -0,0 +1,22 @@ +/* { dg-options "-O2 -fdump-ipa-profile" } */ + +__attribute__ ((noinline)) +int foo() +{ + return 0; +} + +__attribute__ ((noinline)) +int bar() +{ + return 1; +} + +int main () +{ + return foo (); +} +/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 0" 1 "profile"} } */ +/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */ +/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ |