aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c')
-rw-r--r--gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c
new file mode 100644
index 0000000..8fc2edb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-fdiagnostics-show-nesting" } */
+
+extern void foo (void);
+
+void test_nesting (void)
+{
+ foo (); /* { dg-error "top-level error" } */
+}
+
+/* { dg-begin-multiline-output "" }
+ * child 0
+ * grandchild 0 0
+ * grandchild 0 1
+ * grandchild 0 2
+ * child 1
+ * grandchild 1 0
+ * grandchild 1 1
+ * grandchild 1 2
+ * child 2
+ * grandchild 2 0
+ * grandchild 2 1
+ * grandchild 2 2
+ { dg-end-multiline-output "" } */