diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/inline-dump.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/inline-dump.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/inline-dump.c b/gcc/testsuite/gcc.dg/inline-dump.c new file mode 100644 index 00000000000..e0c9ba6993c --- /dev/null +++ b/gcc/testsuite/gcc.dg/inline-dump.c @@ -0,0 +1,11 @@ +/* Verify that -fopt-info can output correct inline info. */ +/* { dg-do compile } */ +/* { dg-options "-Wall -fopt-info-inline=stderr -O2 -fno-early-inlining" } */ +static inline int leaf() { + int i, ret = 0; + for (i = 0; i < 10; i++) + ret += i; + return ret; +} +static inline int foo(void) { return leaf(); } /* { dg-message "note: leaf .*inlined into bar .*via inline instance foo.*\n" } */ +int bar(void) { return foo(); } |