aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c
blob: 8fc2edbfb7813faf2cf63416b7c11e84443b52fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 "" } */