summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug_info_inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug_info_inline.c')
-rw-r--r--gcc/testsuite/gcc.dg/debug_info_inline.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug_info_inline.c b/gcc/testsuite/gcc.dg/debug_info_inline.c
new file mode 100644
index 00000000000..a9152615c73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug_info_inline.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+int g, a;
+
+static int foo ()
+{
+ int ret = a;
+
+ if (g > -10)
+ return 10;
+
+ return ret;
+}
+
+int bar()
+{
+ if (foo())
+ return 0;
+ else
+ return 1;
+}
+
+/* { dg-final { scan-assembler "loc 1 19 0\n.*\n.LBB" } } */