aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/gcc/testsuite/gcc.dg/debug/dwarf2/mlt1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.0/gcc/testsuite/gcc.dg/debug/dwarf2/mlt1.c')
-rw-r--r--gcc-4.4.0/gcc/testsuite/gcc.dg/debug/dwarf2/mlt1.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc-4.4.0/gcc/testsuite/gcc.dg/debug/dwarf2/mlt1.c b/gcc-4.4.0/gcc/testsuite/gcc.dg/debug/dwarf2/mlt1.c
new file mode 100644
index 000000000..7b0b2e994
--- /dev/null
+++ b/gcc-4.4.0/gcc/testsuite/gcc.dg/debug/dwarf2/mlt1.c
@@ -0,0 +1,32 @@
+/* Test that -gmlt includes line tables and inlined subroutine entries,
+ and excludes types and variables. */
+/* Origin: Cary Coutant <ccoutant@google.com> */
+/* { dg-do compile } */
+/* { dg-options "-O2 -gdwarf-2 -dA -gmlt" } */
+/* { dg-final { scan-assembler "DW_AT_stmt_list" } } */
+/* { dg-final { scan-assembler "DW_TAG_subprogram" } } */
+/* { dg-final { scan-assembler "DW_TAG_inlined_subroutine" } } */
+/* { dg-final { scan-assembler-not "DW_TAG_variable" } } */
+/* { dg-final { scan-assembler-not "DW_TAG_formal_parameter" } } */
+/* { dg-final { scan-assembler-not "DW_TAG_base_type" } } */
+
+static inline __attribute__((always_inline)) int
+a(int i, int j)
+{
+ return (i << 5) + j;
+}
+
+int
+b(int i, int j)
+{
+ return (i >> 5) + (j << 27);
+}
+
+int
+c(int i, int j)
+{
+ int r = a(i, j);
+ r = b(r, i);
+ r = b(r, j);
+ return r;
+}