aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/testsuite/gcc.dg/inline-dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/testsuite/gcc.dg/inline-dump.c')
-rw-r--r--gcc-4.6/gcc/testsuite/gcc.dg/inline-dump.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.6/gcc/testsuite/gcc.dg/inline-dump.c b/gcc-4.6/gcc/testsuite/gcc.dg/inline-dump.c
new file mode 100644
index 0000000..f08bd00
--- /dev/null
+++ b/gcc-4.6/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 -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." } */
+int bar(void) { return foo(); } /* { dg-message "note: foo inlined into bar" } */